Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

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.