Quote:
|
Originally Posted by bcddd214
Ok, let me start by saying I am not a newbie.
[...]
Ok, make a new directory!
Permission denied
Get where I am coming from!
If somebody could kindly reply with the down and dirty, quick chart of commands to manage permissions and the global effects of permissions dealing with Apache.
|
Not getting into Apache, but here are the basics as I understand them.
To create a directory (or any file), you need write AND execute permission on the parent directory. (You talked octal, so that's octal digit 3.) For removing, same, and if the containing directory has the sticky bit 01000 set, you must also own what you remove.
The permissions that apply (in any operation) depend on who you are:
If you're root, you can do virtually anything.
Otherwise if you own the file (or directory), i.e., when your user id matches the file's owner, the
user permissions (700 or first triplet in rwxrwxrwx notation) apply.
Otherwise if any of your groups (primary or auxiliary) matches the file's group, the
group permissions (070 or middle triplet) apply.
Otherwise the
other permissions (007 or last triplet) apply.
Funny consequences:
(A) If you give 044 to a file, everyone can read it, except you.
(B) You can remove other people's stuff, even if you have zero access to it, as long as you have -wx on the containing directory and it's not sticky.
And, as you correctly indicated, you use
chmod to change permissions. Only the owner (and root) can chmod a file.