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

Bhanu Awasthi
Bhanu Awasthi
1,780 Points

Why changing ownership to "mike" doesnt allow user to write, since a user is allowed with permissions "rw-"

Following is the file permission:

-rw-r----- 1 mike treehouse 427 Oct 10 15:22 hello.txt

1 Answer

Jason Anders
MOD
Jason Anders
Treehouse Moderator 145,631 Points

Hi Bhanu,

In the video, Jim changes the owner of the file to Mike (who has read/write) permissions, but Jim does not change the current user to Mike. He continues on with the lesson as the user "treehouse." The file permissions for the group 'treehouse' which is where the current user is a part of only has read permissions. Also, the 'general public' who are neither the 'owner' or part of the group have no permissions.

Near the end of the video, Jim does change the user to Mike (the now owner) to show that he does, in fact, have the permissions to write to the file.

I hope this clears it up for you. Keep Coding! :)

Bhanu Awasthi
Bhanu Awasthi
1,780 Points

Hi Jason,

The doubt I was having in mind is completely cleared by your answer. Thank you for a swift reply and help.

Kind Regards

Jason Anders
Jason Anders
Treehouse Moderator 145,631 Points

You're very Welcome. I'm glad it cleared it up for you. :)