Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Linux permission, what is the X? [closed]

If I set 751 to a directory, the permission are: drwxr-x--x

the "x" what does it mean? If i set that permission means anyone could access to this directory but ONLY the owner and the GROUP could read the contents?

Let me know, thank you

like image 765
Damiano Avatar asked Apr 26 '11 13:04

Damiano


People also ask

What does X mean in file permissions?

"r" means: read permission. "w" means: write permission. "x" means: execute permission.

What is capital X in chmod?

The capital X permission option tells chmod to grant execute access only if it makes sense -- if the item is a directory, or already has at least one execute access enabled (i.e. if it appears to be an executable file).

What does Drwxrwxr x mean in Linux?

drwxr-xr-x. A folder which has read, write and execute permissions for the owner, but only read and execute permissions for the group and for other users.

What permission is Drwxr x ---?

drwxr-xr-x (755) -- Everyone can read the directory, but its contents can only be changed by the user.


1 Answers

The execute 'x' permission, when set for a directory, grants the ability to traverse its tree in order to access files or subdirectories, but not see the content of files inside the directory (unless read 'r' is set). (*)

So in your example, owner, group and others can do anything, group can cd into the directory and ls (read the list of the files within), others can just cd into the directory to access subdirectories, but that's quite an useless permission without "read".

(*) See http://en.wikipedia.org/wiki/Filesystem_permissions#Permissions

like image 174
gd1 Avatar answered Nov 10 '22 16:11

gd1