on 05-13-2008 8:31 PM
Hi Experts,
I would like to know that is there any way to set UMASK only for one selected directory? UMASK settings are global, but I would like to set UMASK to XYZ folder to be 007. only that folder so if Everyone user were to put a file in XYZ folder, they will rw-rw permission.
Is it possible?
Thanks,
Hi Juan,
My directory has 777. when I touch a file, It creates with RW-RR from UMASK 022.
Thanks,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi there,
you can set an umask to an folder????? Thats new for me, and i think not possible.
You can chmod the rights of an folder.
Or you can change the "umask" for an specific user.
So the umask is usercontextspecific. It is possible to
set the umask only for a loginsession,
or permanent. If umask set permanent, all files created under this user,
will have these filerights.
edit
Your Problem can be solved with "setfacl" and "getfacl", say Access Control Lists.
There you can tell the Folder, which default rights a file gets, if it will be created there.
Regards
Manuel
Edited by: Manuel Herr on May 14, 2008 8:43 AM
Using Linux filesystem ACLs, you can set a Default mask for a directory. Properly constructed, it will affect files created in the directory.
This mechanism is totally separate from the umask value in your shell environment. Don't confuse or conflate the two.
You should read and understand man acl and man setfacl - experiment somewhere that it won't hurt anything and make sure you have designed the proper solution.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Juan,
Yes, you are right. But that is only for time being. If I go to that directory and umask it to 007, it will change to umask and If i touch a file, it creates a file according umask 007. but that is only for one time. If i logout or someone else try to touch a file again, it takes the default umask and it is global. I want to keep the umask for global as it is but I would like to change the umask of XYZ folder to be 007 permanently.
Thanks,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As far as i know you can umask a specific directory by just using command umask 007 /<path>/<directory> or by going to the directory and executing the command on it own... correct me if im wrong.
Regards
Juan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.