One more CIFS mounting question

As many of you I cannot mount NAS sharing by the web GUI I have to use a command line in SSH

sudo mount.cifs //192.168.0.200/freenas/HDtracks /mnt/NAS —verbose -o , user=USER,password=PASSWD,rw,iocharset=utf8,sec=ntlm

and it works…

But I have an another share, in fact the iTunes folder.But this one contain a space in the path:
share/iTunes Music

with:

sudo mount.cifs //192.168.0.201/share/iTunes Music /mnt/NAS —verbose -o , user=USER,password=PASSWD,rw,iocharset=utf8,sec=ntlm [/code]

it doesn’t work.
Under Ubuntu it seems that you have to use \040 to swap the " "

with:

sudo mount.cifs //192.168.0.201/share/iTunes\040Music  /mnt/NAS —verbose -o , user=USER,password=PASSWD,rw,iocharset=utf8,sec=ntlm

but still doen’t work :frowning:

Any ideas?
Thanks

I am replying to myself, maybe it will help someone …

If you want to mount things like that: /share/iTunes Music
You have to write it like that: mount cifs //xxx.xxx.xxx./share/iTunes" "Music

your problem is the fact that your directory name consists of two words.

you may to use the “” in front of the space (e.g. iTunes\ Music) but this may not always work, depending on the “shell-environment” the command is running in. (in linux or unix O.S.s every command runs in its own environment, i.e. sh, ksh, csh bash. Some will and some won’t work with escaping the space-character).

a “quick and dirty” way is to alter the name of the directory on your NAS and replace the " " to a “" as an example. I did the same. The "” makes the name to one word.