|
Permissions on the Public Directory
Permissions on the Public Directory
Locations
Create /mnt/data directory, and /mnt/data/public directory.
Mounting in fstab
Put a line in your /etc/fstab to mount the fs like this:
/dev/vinum/pincushon /mnt/data ufs rw,nosuid,suiddir 0 0
The nosuid option prevents files with the suid bit set (this
is good), and the suiddir option allows directories to control the user and
group of files created within them (this is good only for a file server). You
must have "options SUIDDIR" compiled into your kernel to use the suiddir option.
Set the permissions on /mnt/data/public like this:
chmod 4775 /mnt/data/public
This enables suiddir on /mnt/data/public. If your public directory
already contains files and folders, you can change the permissions on the
current files with a few lines like this:
/usr/bin/find . -print | awk '{print "chown bpfountz \"" $0 "\""}' | ksh
/usr/bin/find . -print | awk '{print "chgrp BinsFriend \"" $0 "\""}' | ksh
/usr/bin/find . -type f -print | awk '{print "chmod 0664 \"" $0 "\""}' | ksh
/usr/bin/find . -type d -print | awk '{print "chmod 4755 \"" $0 "\""}' | ksh
Conclusion
This is for a public share, and helps remedy the problem of having all
different user's and group's build up in your public share. Even if you
copy files into the directories through the terminal, it is hard to mess up
the user and group settings.
In conclusion, this basically rules. My server is on a conquest to be
the shiznit, and well, this doesn't hurt.
|