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.

write to file on target fs

Expert 1100 points

Hello,

I am working with nfs. When I try to open some file for  writing (fopen(fileName, "r+"); )  I get the "Permission denied" error. I execute the application from target. I checked the file's permissions and I tried to remount the file system (mount -n -o remount,rw ) from root directory.

Does It mean that my target's fs is mounted as read only fs? How can I check this?

Thanks.

  • Hi Alla,

    It may depends on NFS server implementation, but if your NFS server is Linux, the following commands may help.  The first command shows how the NFS server exports the files to clients with what permission, and the second command shows if the original file system (which is exported by NFS) is read-only or not.

    nfsserver$ sudo exportfs -v
    nfsserver$ sudo mount

    Please refer some NFS tutorial too.

    Best Regards,
    Atsushi

  • Hi Atsushi,

    My problem was that I had an error in /etc/exports file and the

    default is loading the specified fs as RO.

    Thank you.