I use chmod to change the file permissions. But what if I needed to grant full control permission for the logged in user over a directory ?
3 Answers
Did your try
chmod u+rwx <your directory>
from the directory above the directory you want to change? Be aware that a user can only change permissions of files/directories he owns.
If you want to change permissions of a directory and any subdirectories and files you have to use
chmod -R u+rwx <your directory>
chmod works on files AND directories
http://www.thegeekstuff.com/2010/04/unix-file-and-directory-permissions/
correcting my response : setfacl -m u:jvmohan:rwx directory-name
This should set the acl on the directory for the specific user with name jvmohan
-
sry my mistake I think I made sandwith of chmod and chown ..let me correct my response to setfacl -m u:jvmohan:rwx d2 Aug 10, 2012 at 13:14
-
chmod u+rwx mydir
and the command seems successful because the console does not give any errors. When I access the folder, I still find some files that does not havex
permission for the current user. What is the reason ? Knowing that this folder is not created by me (the current user).chmod
has a-R
flag for this.