Sure.
In file system permission by default or usually a file or directory has following permissions:
Read equivalent to 4
Write equivalent to 2
Execute equivalent to 1
Further these permissions are setup on the basis of owner then group and then others. So basically if I am setting up 775 permission on a directory using:
Code:
chmod -R 775 /directoryname
that means that I am setting up permission recursively (sub-folders included) on the given directory name where,
1. Owner will have full permission (7=4+2+1)
2. Group will have full permission (7=4+2+1)
3. Other will have read and execute permission (5=4+1). Execute permission is necessary when you are setting it up on a directory otherwise user will not be able to even get into that directory. On a file we only setup execute permission when it is a script / executable file. Otheriwse it is not advisable to set execute permission on file.
Apart from above mentioned permission there are other permissions as well; Like:
1. uid equivalent to 4: This is used to allow multiuser access
2. gid equivalent to 2: This is used to allow multigroup access
3. sticky bit equivalent to 1: This is used to prevent accidental deletion of a file.
So basically the command that I gave you in my previous post translates to:
Code:
chmod -R 2770 /temp
Change permission of temp directory to be setup with gid (multigroup access) where owner and group members will have full permission and other will not have any access.
The reason I have used
Code:
chown -R nobody:downloads /temp
So that when group members create file it will get created with their name and groupname reflects as downloads. This is consider to be best practice or way to setup a shared directory.