a specific umask for a folder
hello everyone,
i know my question has been raised in internet forums on occasions..., but i have failed to receive an answer im looking for a way to set the umask for a specific directory to a different value (0002), than the global one (0022)... obviously this is a shared folder and i have set the gid bit so that all file in the directory belong to a specific group... chmod will give the permissions that i wish for... but all new files will be generated according the default umask... how can i set a umask specific to the directory? TIA nass |
Hi.
I'm not sure if this will solve your problem, but have you considered using ACLs? You can set a default ACL for a folder, so that all folders and files created under this folder will inherit the ACL. I'm think that ACLs override "regular" linux file attributes, so hopefully this will solve your problem. Regards, kenneho |
OP, are you still using Slackware 11?
Does it have ACL's? Do you know anything about using them? If all you want is for files & directories to inherit ownership & permissions from the parent "folder", I believe you can do it w/ GID bits on the parent. RT:)M chmod & chown for the details. Post back if you don't understand the man page(s). |
i don't think this is the case with the s bit in gid...
it is there to preserve group ownership for dirs and files within an s-bit GID directory, but it does not alter the group permissions of a dir or file that will be created afterwards.. this is still governed by the umask.... and i want a specific -different- umask for a certain common directory... i think ACLs will do the trick.. they should be pretty easy to handle since they are a superset of the POSIX file attributes. im looking into them right now |
Quote:
|
You can specify a umask when using "mount bind", let me know if you need more info
|
I have now written a blog post on the subject...
http://www.linuxquestions.org/questi...-bindfs-23934/ |
How to solve with ACLs
Resurrecting an old thread, but I find the answer that worked for my situtation. I basically followed this blog post: http://brunogirin.blogspot.com/2010/...th-setgid.html
-Randy |
All times are GMT -5. The time now is 06:39 AM. |