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 Sudo

Why is sudo not given other execute permissions?

Video referenced: https://teamtreehouse.com/library/console-foundations/users-and-permissions/sudo

The result of upgrading to sudo level permissions for user treehouse shows:

drwxrwxr-x 3 treehouse

so why does the other not have execute permissions despite being a super user?

What do you mean by other?

I'll assume you mean the file 'hello.txt' that is listed below the directory 'documents' when he ran the ls -l command around the 4:15 mark.

Each file will have individual permissions (r w x) depending on whether you are the owner, part of the group that the owner is or everyone else. This is why there are 3 sets of rwx in the bitwise representation drwxrwxrwx

The sudo function does not change this. It simply makes the effective uid (user id) root for the user running the command.

So even though he is a super user after running sudo it will still only show the permissions for that file, regardless of what user id you have.

So for the hello.txt file the -rw-r----- to tell us that (for this file at least) the owner can read and write, and anyone in the same user group as the owner can read it. Everyone else cannot view it.

I hope I was able to provide some insight, but I'll be honest I don't fully understand your question so if this doesn't help then please explain and I'll try my best.