[SUMMARY] NFS Sharing/Autofs

2007-12-25 11:05:00

In sharing filesystems through NFS, root on client systems was not recognized

as a privileged user. In order to allow root privileged access, the

"root=<machine>" keyword pair must be added to the share command in

/etc/dfs/dfstab.

Thanks to the following people:

John Stoffel <jfs@fluent.com>

"Peter Utama" <putama@ect.enron.com>

Anthony.Worrall@reading.ac.uk (Anthony Worrall)

My original question was:

> Has anyone been able to share a filesystem using autofs that allows read-only

> access to certain machines, and read-write access to others? I'm using the

> autofs mounting system and this does not seem to be possible for directories

> owned by root.

>

> For example, I have a /src directory that's owned by root on machine0 that I

> want machine1 and machine2 to be able to mount, but read-only. I also want

> that to be mounted read-write by machine3. My /etc/dfs/dfstab has an entry:

>

> share -F nfs -o ro=machine1n2grp,rw=machine3 /src

>

> ..where machine1n2grp is a /etc/netgroup entry for machine1 and machine2.

>

> My /etc/auto_master file for autofs specifies a direct map, auto_direct. My

> /etc/auto_direct file contains:

>

> /src -fstype=cachefs,backfstype=nfs,cachedir=/var/cache/src machine0:/src

>

> Both auto_master and auto_direct are exported through NIS to machine1,

> machine 2, and machine3.

>

> Now, /src is owned by root on machine0 and exported to the other machines.

> When attempting to write to /src on machine1 and machine2, the error "Read-

> only Filesystem" shows. When attempting to write to /src on machine3, the

> error "Permission denied" shows. Does anyone know anyway around this?

Comments

Got something to say?

You must be logged in to post a comment.