ls -al /path/to/file/or/dir
-for files, or a
rwxfor groups and users that are now owning the file
rwxis showed as a
-, it means that the permission is not granted.
-Rto your chmod
chmod -R 750 /home/userdir
rwxfor these, but of course, you should pick the permissions you wish to add or remove.
chmod +rwx filenameWill add read, write, and execute permissions to this file anyone on the machine. r stands for "read", w for "write", and x for "execute"
chmod +x filenameWill make the file executable by anyone on the machine.
chmod -rwx filenameWill remove read, write, and execute permissions to this file anyone on the machine. Note : root user is the only exception.
+rwxby anything previously mentioned
chmod -R a-s /path/to/dir
chmod -R 0xxx /path/to/dir
chmod -R 0640 /home/user/website
chmod -R u+s /path/to/dir/
chmod -R 2xxx /path/to/dir
chmod -R g+s /path/to/dir/
chmod -R 4xxx /path/to/dir
chmod -R a+s /path/to/dir/
chmod -R 6xxx /path/to/dir