Web Mail


Single IP

Project Links
resume
about me
about server
user land
webmail

Photo Albums
bpfountz
lpfountz
twice DIGITAL

Web Pages
bpfountz
lpfountz

Reviews
3054CB
Netgate Q&A
5354AP1 Aries2

You are visiting...
The DigitalPimp


created by:
 Ben Pfountz
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.

Permissions

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.

Install Notes
a7v bios
os notes
os install
kernel cfg
ports update
vinum
soft updates
quotas
public pmsns
firewall
named
ppp
dhcpd
samba
apache+modssl
mod_php5
proftpd
qmail
blackhole
courier-imap
shared-folders
sqwebmail
skeleton
dependencies
nut
automount
net-snmpd
mrtg
system update
system config
formt floppy
wireless IPsec
bdes cdrw's
MySQL
Cert Auth
CPES AD 1
CPES AD 2
CPES Grp Plcy
AD1 <-> AD2
AD Reference