dir and group ownership automatic set
Hello,
Is it possible to set the ownership and group on a dir in such a way that all files created in that dir will automatically be set to a specific owner and group regardless of who creates the file? I have a shared project dir that holds documentation for our project and I would like all the documents in the dir to be owned by the project and in the projects group. I can create a cron job that will run each night and do a chown and chgrp on the dir but was wondering if it was possible to set permissions in such a way that no matter who creates a document there it will be at the permission level of the dir. I've searched the web and can't find anything like this, so I'm guessing I just keep running the cron job. The closest I've found is setting super bits, but that doesn't seem to work for newly created documents. thank you for any help you may have. |
This should work for a directory:
Code:
chmod g+s /name/of/directory |
thank you.
It seems to work for the group, but not ownership. I even tried a chmod 6775 on the dir so it looks like drwsrwsr_x. I must go back and study more on superbits. Bummer :scratch: |
It doesn't work for user ownership. The setuid bit has no effect.
A google 'I'm feeling lucky' produces this link: http://www.comptechdoc.org/os/linux/..._ugfilesp.html Which is helpful. |
All times are GMT -5. The time now is 07:41 AM. |