chmod

File permissions on html server (recursive chmod) differentiating between files and directories

I recursively screwed up the file permissions in my html servers root directory. To fix it I needed to deploy some "advanced" chmod settings. Obviously I want to treat directories and files differently. I didn't come up with a better solution than the following:

chmod -R u=rw-x,g=rw-x,o=r-wx *
chmod -R a+X *

No chown or chmod on samba mounts

I figured out (hopefully correctly) that owner, group and accession rights to files and directories on an smbmount are not changeable, not even by root. Thus you have to specify everything at mount time, e.g.:

sudo mount -t smbfs -o username=jeltsch,credentials=/home/jeltsch/.smbpasswd5 -o uid=backuppc,gid=users,fmask=644,dmask=755 //patolmac217/jeltsch /mnt/jeltsch@patolmac217.hi.helsinki.fi