This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

NFS permission issue

Hello Community,

I just got my NFS Root File System working. I created the NFS image as explained in the Getting Started Guide and copied the content on my linux host to the following directory:

/home/maik/omap3evm_nfs

So far so good. I start the board, U-Boot initiates the booting progress. Linux boots from NFS and everything works fine. Unfortunately, I have no write permissions on the OMAP-Side. That means things like "mkdir testDirectory" do not work. I solved the problem by changing the rights on the host side with

sudo chmod -R a+rw ~/omap3evm_nfs/*

and that works but this dirty workaround does not really satisfy me [:P]
Why do I have no permissions to access and manipulate the files? Is this a nfs-server issue?

 

By the way:

I run nfs-kernel-server and as proposed in the Getting Started Guide added the following line to the /etc/exports file of the server:/home/maik/omap3evm_nfs 192.168.1.10/255.255.255.0(rw,sync,no_subtree_check)

 

Thanks in advance!

Maik

  • Maik Pflugradt said:
    Why do I have no permissions to access and manipulate the files? Is this a nfs-server issue?

    The default NFS server options will give the remote user the same permissions as a local anonymous user, that is even though you are logged onto the EVM and its filesystem as root, your accesses to the NFS based filesystem are 'squashed' and only given the local anonymous user permissions through the NFS server.

    One way around this is to do as you have already done, just open up privelages to the NFS mounted folder to everyone, this is a fine solution though I suppose if you were concerned about security with other local users of the host machine this could pose a problem and be considered a 'dirty workaround'.

    The alternative would be to put no_root_squash and/or no_all_squash into the NFS server options (along with rw, sync, etc.) which will tell the NFS server not to squash any requests from the remote machine mounting the NFS (i.e. the EVM). This has its own security problems though, since you could now have anyone who can mount the NFS server accessing the files, and in particular with no_subtree_check this could mean a way for a nefarious NFS client to hack into the host.

  • My /etc/exports actually has the (rw, sync, no_wdelay, no_subtree_check, no_root_squash)  flags set.

    and the nfs connection is mostly working.  I seem to be able to edit files on the client side located on the server and even save changes, however any new changes (mkdir or creating new files) I make from the client/target side only show up on the target and then are gone after a reboot.

    Is there something else that needs to be set, so all changes/additions from the target are saved on the server?

     

    thanks for any help.

     

     

  • Can you try the following options instead and see if this fixes the issue?

       *(rw,no_root_squash,no_all_squash,sync)

     

  • Hi Juan,

     

    No luck, the client changes still aren't showing up on the server side.

  • Another thing that comes to mind is to make sure that anothe Linux host machine is not in the same network as your EVM.  I have seen cases where multiple people are working in the same network running Linux Host via VMware image and it was discovered that some VMware images were being assigned the same IP address by dhcp server and as a result changes being made by a user where actually taking place is a separate host machine than expected.  You can try placing your EVM and Host machine in an isolated network to see if this problem continues, maybe take it one step further and use static IPs in an isolated network.  I wrote a small doc a while back on doing this for one of our DaVinci platforms, but it should hold for OMAP as well: http://focus.ti.com/general/docs/litabsmultiplefilelist.tsp?literatureNumber=spraaq0

     

     

  • Hi Juan,

     

    My OMAP target is on an isolated statically allocated network connection with the linux host pc.