[Samba] can samba keep uid/gid/permission on a per-file-base?

Edward Ned Harvey samba at nedharvey.com
Tue Jun 9 17:54:29 GMT 2009

> I'd like to use a linux-based NAS to backup loads of files *including
> their permissions and uid/gid*.  The NAS supports NFS (which can do
> what I want) but the NFS-connections breaks all the time.

This is a strangely common question recently.  I'll paste here, the response I wrote in some other message.

If you're having NFS reliability problems, it's due to misconfigured NFS.  Below is the config that I deploy to all the locations where I do their IT, because after zillions of hours of manual reading, testing and usage - it's a tried & tested rock solid config for linux-to-linux nfs filesharing.

Assuming you're on Linux, I'll suggest the following NFS options in your exports file, and then I think I better butt-out, because this is a samba mailing list:

man exports
	# On a server that has a caching raid controller card, you want sync,no_wdelay
	# On a server that has a simple disk, you want async (no_wdelay has no effect, so you can omit it.) 

And I'll suggest the following options on the nfs client:
Use automount.  Assuming automount 5 you can use auto.direct as below, otherwise create an automount directory as expected in automount 4.
		/-  /etc/auto.direct --timeout=1200
		/share -fstype=nfs,rw,hard,intr,posix  fileserver:/share

If you take my advice here, you'll have a NFS hard mount on the client (therefore resilient) combined with interruptable auto dismount (therefore self healing).  

More information about the samba mailing list