LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   *BSD (https://www.linuxquestions.org/questions/%2Absd-17/)
-   -   nfs permissions issue (https://www.linuxquestions.org/questions/%2Absd-17/nfs-permissions-issue-443478/)

geletine 05-10-2006 10:26 AM

nfs permissions issue
 
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

geletine 05-10-2006 10:56 AM

/usr/home -maproot=root 192.168.0.3
that worked

taylor_venable 05-10-2006 06:25 PM

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.

geletine 05-11-2006 01:47 PM

That was interesting to know.. If two boxes use linux the setup is simply /usr/home 192.168.0.3
thats why is confused me, i can understand why bsd uses the maproot=root or -mapall prefix.

The enviroment is only between two home boxes, its not for production use....

Ive heard alot about NFS being insecure, is this because no encryption verification is being used?

taylor_venable 05-11-2006 05:24 PM

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.


All times are GMT -5. The time now is 01:21 AM.