PDA

View Full Version : NFS and FreeBSD 6.2r strange problem ..


bsduser
07-10-2008, 03:20 PM
Hi .. I am trying to configure my freebsd nfs server to share some folders with my local network area .. actually, I have alredy configured it, I am sharing the folders on my local network area, and everything seems work well except when I try to exports /usr and subdirectories, I got a strange message when I try to mount /usr ( maybe is just my inexperience fault )


Jul 10 16:53:14 Ultra5 mountd[448]: can't change attributes for /usr
Jul 10 16:53:14 Ultra5 mountd[448]: bad exports list line /usr -alldirs -maproot
Jul 10 16:53:27 Ultra5 mountd[449]: mount request denied from 192.168.1.3 for /usr


and I can see this message from the macosx client when I try to mount this directory


macbook-di-pietro:Desktop pietro$ mount -v 192.168.1.10:/usr /Users/Pietro/Desktop/usr_nfs
mount_nfs: bad MNT RPC: RPC: Can't decode result\n


This is my /etc/exports in my freebsd NFS Server


# $FreeBSD NFS sun server
/usr/home/ftpbsd -maproot=root macosx
/mnt -maproot=root macosx
/usr -alldirs -maproot=0 macosx
/usr/home/rackbsd -maproot=bin: -network 192.168.1.0 -mask 255.255.255.0


and /etc/rc.conf


# NFS
rpcbind_enable="YES"
nfs_server_enable="YES"
mountd_flags="-r"


I dunno what to do .. I followed the FreeBSD NFS handbook and I read the exports manpage as well ..

Thanks

lvlamb
07-10-2008, 06:43 PM
NFS V3.0 has a fallback to only mount -r when it does not understands the file system file naming.
In other words, file names encoded UTF-8 will prevent a non-UTF-8 aware client to mount -rw.
Now, NFS has no standard and is included as base in almost every OS each OS maintainer having his own view on the subject.
With FreBSD8 both as server and client I could only mount -ro, while the same files FreeBSD ckient from OpenBSD server worked as expected.
Neither server could be mounted -rw from Windows SFU.

You seem to have a supplementary problem: try to use consistent UID/GID across all OSes
${user}:wheel
will eventually work as 1000:0 (Nor every OS has wheel = root = 0)
most OSes will enable you to set 1000 as minimum UID (some start at 100).
Now NFS mounts on name, not on numbers, hence the GID should have a name and number consistent across OSes.
Also, file names must be restricted to ASCII-7.
Mission impossible.

Summary: don't use NFS :mad:
Am thinking of using database engines for -rw shareable/updateable files, but have no idea of where to start as the database is the file system.

phoenix
07-11-2008, 07:11 AM
When in doubt, read the man page (exports).

There are three parts to an exports line:
path(s)
options, delimited by commas
host(s)

Note the second part. -alldirs -maproot doesn't fit.

bsduser
07-11-2008, 12:48 PM
When in doubt, read the man page (exports).

There are three parts to an exports line:
path(s)
options, delimited by commas
host(s)

Note the second part. -alldirs -maproot doesn't fit.

Ok, but, I tried a lot of possbility, and I always got the same message .. now I am going to rebuild the world and switch to 7.0 stable, maybe something will change ...