[YLUG] mv and cp to NAS via samba
Chunky Kibbles
chunky at icculus.org
Thu Feb 19 18:24:29 UTC 2009
On Thu, Feb 19, 2009 at 06:12:42PM +0000, nigel white wrote:
> Any ideas? I am having trouble copying and moving files via samba. I
> want to copy files from my own machine to a network attached storage
> (NAS) drive called qserver.
>
> I can see smb://qserver/q/temp in the gui file browser.
>
> When I do
> mv /home/nigel/Documents/other/test2.txt smb://qserver/q/temp
> I get
> mv: cannot move `/home/nigel/Documents/other/test2.txt' to
> `smb://qserver/q/temp': No such file or directory
>
> When I do
> cp /home/nigel/Documents/other/test2.txt smb://qserver/q/temp
> I get
> cp: cannot create regular file `smb://qserver/q/temp': No such file or
> directory
mv and cp don't understand network copies. You need to mount the
relevant share on your *nix box, and then copy stuff to it:
sudo mkdir -p /media/qserver/q
sudo mount -o mode=666 smb://qserver/q/temp /media/qserver/q
cp /home/nigel/Documents/other/test2.txt /media/qserver/q
Note that you used sudo to mount the share, so in order for your user to
have write access to it, I set mode=666 [which is equivalent to
rw-rw-rw- , everyone on the system can read and write it]. That's
possibly a little less secure than you really want, but doing it the
"right" way as the next step involves adding an fstab entry, which is
more complicated.
> When I use the gui file browser to copy the file, I get
> Error while copying test2.txt. Connection timed out.
Erm. Well, that's a different issue. My immediate guess is that your
firewall is blocking something somewhere along the way, try disabling it
temporarily to see if that fixes it.
You might also try mounting it and copying from the terminal, as above,
to see if that has the same issue.
Have fun,
Gary (-;
More information about the York
mailing list