LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   folder execution defined (https://www.linuxquestions.org/questions/linux-newbie-8/folder-execution-defined-867298/)

bluegospel 03-08-2011 04:00 PM

folder execution defined
 
Hi. I'm confused as to what it means to execute a folder, that is, what are the various ways a folder can be executed? What are you allowing to be done to a folder when you grant execute permissions?

SL00b 03-08-2011 04:06 PM

If you grant execute permissions to a directory, people can cd to it.

macemoneta 03-08-2011 04:08 PM

From 'man chmod':

Quote:

The letters rwxXst select file mode bits for the affected users: read (r), write (w), execute (or search for directories) (x), execute/search only if the file is a directory or already has execute permission for some user (X), set user or group ID on execution (s), restricted deletion flag or sticky bit (t). Instead of one or more of these letters, you can specify exactly one of the letters ugo: the permissions granted to the user who owns the file (u), the permissions granted to other users who are members of the file's group (g), and the permissions granted to users that are in neither of the two preceding categories (o).

bluegospel 03-08-2011 04:22 PM

So execute, with regard to folders, has only to do with navigating the directory tree? Nothing to do with reading and writing files and directories in that particular folder?

macemoneta 03-08-2011 04:27 PM

Reading and writing are controlled by the 'r' and 'w' modes, respectively.

bluegospel 03-08-2011 04:48 PM

If you can execute a folder, it's essentially some kind of application. Is a folder a kind of service that serves files?

macemoneta 03-08-2011 04:57 PM

Quote:

Originally Posted by bluegospel (Post 4283309)
If you can execute a folder, it's essentially some kind of application.

This is incorrect.

As previously described, the 'x' permission provides search capability on a folder (directory). That means you can cd to it or ls the contents. Nothing more.

bluegospel 03-08-2011 05:04 PM

So execution in terms of folders is NOT the same sense of executing an executable file, or "running" an application?

macemoneta 03-08-2011 05:36 PM

That's correct. The man page clearly defines the difference in behavior for files and directories.


All times are GMT -5. The time now is 04:04 PM.