On my server I have a directory called /data and when I am logged in as root, I normally create a new directory in /data/.
My problem is right now as root in /data, when I mkdir <whatever>, the permissions are not what I want on the new directory. Is there a way to set up this server to apply specific permissions to a new directory?
Right now when I run the mkdir command, this is what I get by default:
Code:
drwxr-sr-x 2 root admin 4096 May 16 10:45 drivers
Then I normally do the following to correct the permissions I don't like.
Code:
[root@fback data]# chmod -R 770 /data/
[root@fback data]# chmod -R g+s /data/
This now fixes the new directory and files under /data but is there a way I can avoid this and have all my newly created directories be 770 and throw a sticky bit on the group permission so when someone creates anything under that directory, the group will always be "admin"?