[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Basing new file permissions on current dir perms



This seems like it should be simple enough, yet it's not working that
way. Here's essentially what I want to do:

Lets say I have a directory called mydirectory. The permissions are as
follows:

drwxrwxr-x root mygroup

If a user who is part of mygroup, say myuser, creates a new file within
mydirectory, the permissions of the file end up being:

-rw-r--r-- myuser myuser

What I want, is a way to force the default permissions for new files in
this directory to be:

-rw-rw-r-- myuser mygroup

This is meant to be a shared directory with shared files. Unfortunately,
while it's easy enough to create a shared directory, creating shared
files in it by default doesn't seem to be nearly as easy. I set up a
shared directory for myself and my roommates to use, but they are very
lazy about resetting the permissions on files they add, so I end up
being unable to modify them (without going in as root). It would be
really nice to be able to automatically set the permissions to the
correct values whenever they create a file. Any help is greatly
appreciated.
-- 
Alex Malinovich
Support Free Software, delete your Windows partition TODAY!
Encrypted mail preferred. You can get my public key from any of the
pgp.net keyservers. Key ID: A6D24837

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: