Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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.
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. RTM 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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.