How to specify 'spaces' in remote dir and user?

Hi,
I’m trying to mount a windows directory via SMB/CIFS within the WebUI.
Either the directory name and the user name have spaces.

I was able to manually mount it from the command line using the "\ " chars for spaces.
In the WebUI it looks like it needs something different.

Thanks for the help!

Giovanni

Hi Giovanni, try with _

let me know!

Hi,
I think the problem of the WebUI hang is related with this issue.
As soon as I use spaces in the NAS remotedir or user I cannot update the NAS settings any more.
At this point I cannot access to other settings menu, too.

I have found this message in /var/log/php_errors.log

Note that the _ does not work to replace the spaces.
I can successfully mount this directory replacing spaces with “\040” in the /etc/fstab file or "\ " with mount.

Final question: is there any way to reset configuration from terminal?
If not I need to flash the sdcard every time this problem occurs. :frowning:

Cheers
Giovanni

Hi Michelangelo,
finally I sorted it out. I did change a bit the php files.

Basically I did:

  1. removed the substitution of \ with / (file /var/www/sources.php)
    // $_POST[‘mount’][‘remotedir’] = str_replace(’\’, ‘/’, $_POST[‘mount’][‘remotedir’]);

In this way I can use the following syntax in the Web forms:

Remote Directory: Users/Nome\ Cognome/Music
Username: Nome\ Cognome

  1. removed the quotes " from the mount command (file /var/www/inc/player_lib.php)
    $mountstr = “mount -t cifs //”.$mp[0][‘address’]."/".$mp[0][‘remotedir’]." -o username=".$mp[0][‘username’].",password=".$mp[0][‘password’].",rsize=".$mp[0][‘rsize’].",wsize=".$mp[0][‘wsize’].",iocharset=".$mp[0][‘charset’].",".$mp[0][‘options’]." /mnt/NAS/".$mp[0][‘name’]."";

To remove the error
mount: Not a directory

This works for all my remote directories. I do not use path in the dos style with .

I hope it helps :wink:

Giovanni

Would it not be much easier to just remove the spaces from the DIR/Username altogether?

This is the music already available on my wife’s pc. Do you mean I should ask her to rename the windows user?
No way :unamused:

Hurraaaayyyy :slight_smile:

Now my NAS disk mounts. I changed the names of the directories next to my music collection to not contain ‘space’.

I mount /Public/Musik. The names I changed were /Public/SharedPictures (from /Public/Shared Pictures) and /Public/SharedVideos (from /Public/Shared Videos).

Stig

Thank you!