1

I have a directory "dir1" who's owner is "owner1" and it has 775 permissions.

Another user in the same group as "owner1" is called "owner2"

Whenever a file is written to "dir1" by "owner2" I need the permissions to be 600, and if it writes a directory, I need it to be 700.

How can I do this? Do I need a UMASK?

0

1 Answer 1

1

If the "owner2" will have umask 077 it will clear group and other permissions from the list for all files created while this is set. The problem of course would be that "owner1" won't be able to read those files.

If there is a specific program that creates files in "dir1" then the shell from which this program has been started can have umask 077 set for it.

Example

umask 077 ; ./start_creator_owner2

If this line is part of the start script then the everything created by start_creator_owner2 will have go permissions of 0.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .