*BSDThis forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Ive set up a nfs client with freebsd with the following line which works
/usr/home 192.168.0.3 , the linux server can mouunt it but only as read only, i looked at the man page for exports and by default rw is enabled, but obviously its not
i would like to copy some files from the linux box to the freebsd box, thats all
I know you've got it figured out, but in case you're fuzzy on the reason behind it, the problem was permissions. NFS decides permission based on numeric UID only. If you're using 1000 on the client machine and user 1000 on the server, then you're set; no adjustments necessary. The exception is client UID 0 (i.e. root) which, by default, gets mapped to the "nobody" account (if I recall correctly) server-side. To make up for the fact that the same user may have different UIDs on different machines requiring NFS access, the NFS server can configure its exports using two different options: -maproot and -mapall. The first (-maproot) maps the client root (UID 0) user to the given user on the server. In other words, -maproot=root made your client's root account actually behave as root on the server, instead of the default "nobody" account, which has no privileges. The second option (-mapall) maps all connected client users to a specific server account. This is not very secure, but it can work in the right environment. Actually, NFS as a whole is not very secure, so you want to make sure you take advantage of every possible security mechanism when using it.
I think the two biggest problems with NFS are (1) unencrypted transfers, and (2) using numeric UIDs for permissions. Because of (1) any intercepted data is immediately available for use. Because of (2) all I would have to do to get your files would be to put my machine in place of yours (in terms of network address), and give my user the same numeric ID as you have. If you use -mapall, I wouldn't even have to worry about having the same UID. If you use -maproot, I could get everything just by being the superuser on my own system. That's why NFS machines (clients and servers) should always be very carefully firewalled.