Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

with the following mount command I can copy from 10.112.12.180 any file to the linux machine (/mnt)

    mount -t nfs 10.112.12.180:/dir1/dir2/dir /mnt

my question if it possible to perform the other side: to copy from linux machine to 10.112.12.180 server

I try it but I get

 cp file /mnt
 cp: cannot create regular file `/mnt/file: Read-only file system

how to get solution for this (copy from linux to server?)

mount + copy files to mounted directory is it possible?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

NFS can be quite tricky.

You should check /etc/exports file at the 10.112.12.180 and see if the share has been setup with read+write permissions (rw). A correct /etc/exports line should be something like

/dir1/dir2/dir xxx.xxx.xxx.xxx(rw)

... where xxx.xxx.xxx.xxx is the IP address (range) for your allowed NFS clients.

Also NFS might shoot you to the foot if you're trying to copy files as a different user than the one owning the NFS share.

share|improve this answer
    
my /etc/exports is empty files? what I need to do? –  lidia Jul 29 '10 at 7:38
    
What, the /etc/exports at the 10.112.12.180 is empty and it still allows you to mount some NFS share? What distribution are you using and what tool you have used to setup that 10.112.12.180? If NFS seems to be too much hassle, you might want to consider copying via ssh (using scp or rsync). –  Janne Pikkarainen Jul 29 '10 at 7:44
    
the server 10.112.12.180 is windows server not linux –  lidia Jul 29 '10 at 7:46
    
Oh, that changes the game a bit. I have no idea how to configure NFS in Windows. :) Samba is a way much more used approach when it comes to filesharing between Windows and Linux/Unix. –  Janne Pikkarainen Jul 29 '10 at 10:22

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.