Cannot access files on NAS via CLI or script

Asked by Paul Hunt on 2012-11-01

Sirs,

I am using Ubuntu 12.10 and a Buffalo NAS. The contents of the NAS have been written by a Windows 7 machine. I can read, write and copy files to and from the NAS via the Ubuntu GUI but cannot do anything other than ls -l from the CLI.

I note that when connecting to a server the GUI file browser mounts the shared volumes at:

/run/user/paul/gvfs

The shared volumes appear as (for example):

smb-share:server=192.168.1.9,share=paul

I've written a script that runs at start-up to mount the shared volumes. The script is along these lines:

cd /run/user/paul/gvfs
gvfs-mount smb://192.168.1.9/Paul

As far as I can tell, this replicates what the GUI does.

When accessing a directory on the NAS via the CLI, commands such as cp and rsync just hang with no error reported. Sometimes cp works but only for filenames with an extension, for example, "cp test.text destination" would work but "cp test2 destination" would just hang.

I've written a simple incremental backup script, the key part of which is:

rsync -av $source_dir $destination_dir

If the two parameters refer to directories on the Ubuntu machine, all is well. If one or the other refer to a shared directory on the NAS, execution hangs at this line with no error reported.

It seems rather mysterious to me that all can be well using the GUI but not when using the CLI. I've been playing with this for a few days and am completely stumped.

I hope that you will be able to help.

Regards,

Paul.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu samba Edit question
Assignee:
No assignee Edit question
Solved by:
Paul Hunt
Solved:
Last query:
Last reply:

I suggest you mount the share in the conventional way rather than using gvfs.

Paul Hunt (paul-hunt99) said : #2

Thanks - You are quite correct.

This entry in crontab did the trick:

//192.168.1.18/share /media/paul/BUFNAS01 cifs

I allowed myself to be misguided by the way that the GUI appears to do things.