Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Development Tools Console Foundations Users and Permissions File Ownership

Understanding the group permission?

In the video, 1.54 time elapse the permission are -rw-r------ mike treehouse 427 OCT etc..

Now you are saying Mike is read only but mike here is the user which has (rw-). Also changing the group to mike:mike which will change the group from treehouse to mike. On changing, you are saying it has write mode but group permission is (r--). I am not sure how this is working?

2 Answers

Sarah Bradberry
Sarah Bradberry
7,115 Points

It's only -rw for the user who owns the file. So in the video when the user is changed, he's not the owner of the file any more, which is why it becomes read only.

I think that's the way it was. I watched that particular video a while ago.

I am not sure if I understood you correct. If you notice the permissions while changing the user remains the same. The permission of treehouse is the same of mike.

Sarah Bradberry
Sarah Bradberry
7,115 Points

Sorry, I don't think I explained very well. The permissions for the file will look the same but after changing the user you're no longer the file owner, you are now part of the group. Changing the group will then change you from group to "other"

Sarah Bradberry
Sarah Bradberry
7,115 Points

I just wanted to add the permissions on the file will always look the same no matter which user is logged in, or which group they belong to.