Yes, please review the man page. You need to learn how to translate the octal values to what you'd see with ls -l, as the ls output is clearer.
man chmod will also show you how to to use rwx instead of the octal to change permissions.
That said:
Quote:
1) Do root have permission to delete any file of any users?
|
Yes. It's the main reason for the recommendation to not use a root login routinely.
Quote:
2)How can you configure a directory which allows other users copy files in it but not read them? Would 755 permission would work? I tried doing that but I kept getting access denied.
|
755 doesn't allow anyone but the owner of the directory to write into it. [rwxr-xr-x]
I don't think it's possible to set permissions on a directory that will allow others to write but not read. If the permissions are set to 766 [rwxrw-rw-], others can't see into the directory to write (copy files in) to it, even tho the write permissions is set.
Quote:
3)What exactly does execute permission does? For example, i tried setting a directory which has both permission read and write but execute. I was not even able to enter directory or do with anything with it. I am really confused about execution command.
|
Keith Hedger already answered this one well.
Quote:
4) Does the permission at the directory level dictates if we can remove a certain file in the directory? For example a file is located in directory x which has all the permissions but the directory which the file is located can be only accessed by root. Can anyone delete that file?
|
Your example doesn't match the question, exactly, but no, whether or not a file can be removed isn't affected by the permissions of the containing directory, except that the user needs to be able to "see" into the directory to act on the file. (that is, the execute bit must be set)
Your example asks if the directory only allows root access, can a file with 777 permissions in that directory be acted upon by others? No.