Forum
[SOLVED] Space in Samba share - Printable Version

+- Forum (http://forum.xbian.org)
+-- Forum: Software (/forum-6.html)
+--- Forum: Configuration (/forum-17.html)
+--- Thread: [SOLVED] Space in Samba share (/thread-2382.html)



Space in Samba share - maybeme - 9th Jul, 2014 04:51 AM

A space in a samba share is giving trouble for the automount tool, while previously this was working correctly. In /etc/fstab, you have to define a space using "\040". However, this is parsed as 040 by automount:

Terminal
xbian@xbian ~ $ cat /etc/fstab
//192.168.1.200/Time\040Capsule /mnt/TC cifs username=******,password=*******,rw,iocharset=utf8,file_mode=0777,dir_mode=0777,​sec=ntlm 0 0
/dev/mmcblk0p1 /boot xbian rw,nobootwait 0 1
...

Terminal
sudo xbian@xbian ~ $ cat /var/log/upstart/autofs.log
handle_packet: type = 5
handle_packet_missing_direct: token 10964, name /mnt/TC, request pid 1931
attempting to mount entry /mnt/TC
lookup_mount: lookup(file): looking up /mnt/TC
lookup_mount: lookup(file): /mnt/TC -> -fstype=cifs,username=******,password=******,rw,iocharset=utf8,file_mode=0777,dir​_mode=0777,sec=ntlm ://192.168.1.200/Time040Capsule
parse_mount: parse(sun): expanded entry: -fstype=cifs,username=******,password=******,rw,iocharset=utf8,file_mode=0777,dir​_mode=0777,sec=ntlm ://192.168.1.200/Time040Capsule
parse_mount: parse(sun): gathered options: wsize=65536,rsize=262144,fstype=cifs,username=******,password=******,rw,iocharse​t=utf8,file_mode=0777,dir_mode=0777,sec=ntlm
parse_mount: parse(sun): dequote("://192.168.1.200/Time040Capsule") -> ://192.168.1.200/Time040Capsule
parse_mount: parse(sun): core of entry: options=wsize=65536,rsize=262144,fstype=cifs,username=*******,password=******,rw​,iocharset=utf8,file_mode=0777,dir_mode=0777,sec=ntlm, loc=://192.168.1.200/Time040Capsule
sun_mount: parse(sun): mounting root /mnt/TC, mountpoint /mnt/TC, what //192.168.1.200/Time040Capsule, fstype cifs, options wsize=65536,rsize=262144,username=*******,password=******,rw,iocharset=utf8,file​_mode=0777,dir_mode=0777,sec=ntlm
do_mount: //192.168.1.200/Time040Capsule /mnt/TC type cifs options wsize=65536,rsize=262144,username=*******,password=******,rw,iocharset=utf8,file​_mode=0777,dir_mode=0777,sec=ntlm using module generic
mount_mount: mount(generic): calling mkdir_path /mnt/TC
mount_mount: mount(generic): calling mount -t cifs -s -o wsize=65536,rsize=262144,username=******,password=******,rw,iocharset=utf8,file_​mode=0777,dir_mode=0777,sec=ntlm //192.168.1.200/Time040Capsule /mnt/TC
spawn_mount: mtab link detected, passing -n to mount
>> Retrying with upper case share name
>> mount error(6): No such device or address
>> Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
mount(generic): failed to mount //192.168.1.200/Time040Capsule (type cifs) on /mnt/TC
dev_ioctl_send_fail: token = 10964
failed to mount /mnt/TC
...

Any idea where I can report this bug?



EDIT: http://www.linuxquestions.org/questions/linux-networking-3/can%27t-automount-smb-with-spaces-172819/
Here it is stated autofs needs a different notation for spaces than /etc/fstab:
"\ " should work for autofs. Would this be a possible fix: update /etc/init/autofs.conf so it copies the /etc/fstab file while replacing "\040" with "\ " and then using that new file as input? How can I point autofs to that new file?

EDIT2: OK, now I get I have to edit the process which copies /etc/fstab to /etc/auto.master.d/auto.xbian. Which process is this?


RE: Space in Samba share - maybeme - 16th Jul, 2014 06:06 AM

Found it Smile

Pull request: https://github.com/xbianonpi/xbian-update/pull/12


RE: Space in Samba share - IriDium - 17th Jul, 2014 02:28 AM

Glad you got it sorted.

Can I ask you to edit the first thread and put it as solved. Tnx.