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 Permissions

Boris Vukobrat
Boris Vukobrat
4,248 Points

Directory Permissions?

What about directory execute permission?

/Cosmos/MilkyWay/SunSystem/Earth/United_States

What about permissions? What OS?

James Barnett
James Barnett
39,199 Points

Jeff Busch -

I think he's referring to a particular statement in the video on File Permissions in the Console Foundations course. We'd have to ask Boris Vukobrat what the exact context he's referring to.

Boris Vukobrat
Boris Vukobrat
4,248 Points

Exactly James.

While Jim in otherwise excellent video, noticed .txt files doesn't suppose to have x, there is nothing about directories' permissions in the entire course (didn't finished it though). No big deal, anyway.

Jeff Posix-based OS of course

1 Answer

James Barnett
James Barnett
39,199 Points

Execute permission on a directory is sometimes called search permission. If you found a directory that gave you execute permission, but not read permission, you could use any file in that directory. However, you must know the name. You cannot look inside the directory to find out the names of the files. Think of this type of directory as a black box. You can throw filenames at this directory, and sometimes you find a file, sometimes you don't.

from: http://www.grymoire.com/Unix/Permissions.html#uh-1

Boris Vukobrat
Boris Vukobrat
4,248 Points

This was really fast. Thanks.

I guess you/they are referring to --x combination for directory mode as a "black box". Interesting stuff, must think over all combinations. Also, I wanted to ask about that i-node number, and there are special bits I never dived in deep enough. Perhaps now is the time for me to clear all this up ... excellent tutorial.

James Barnett
James Barnett
39,199 Points

I guess you/they are referring to --x combination for directory mode as a "black box".

I think you've got that backward.

If there was a file in a directory with the permissionsr-- you would be able access the file only if you knew the name, because you lacked the permission to list the files in the directory.

Boris Vukobrat
Boris Vukobrat
4,248 Points

Maybe I am backward :). If dir1 has d--x------ permissions, and dir1/file1.txt has -rw------- and same user/group, that user can't list dir1 but can edit/save file1.txt. So I put --x referring to this and black box.