systemd automounter does not mount Window share containing a space

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
I've been trying to mount a Windows share containing a space using mount.cifs via systemd automounter without success. I placed mnt-data.mount and mnt-data.automount under /etc/systemd/system/ and put the Windows share path behind "What=" in the .mount file. Single or double quotes do not seem to work here, neither does escaping the space with a single backslash. Man page suggest replacing the space with its octal expression, which is \040. Using systemd-escape did not work either, which replaced the space by its hex expression \x20.
Mounting always fails like this:

Jun 16 09:16:49 client kernel: [ 8128.551627] CIFS: Attempting to mount //server.private.domain/path1/path\x20with\x20spaces Jun 16 09:16:49 client mount[101952]: mount error(2): No such file or directory

If I mount the share by hand our put it into the fstab, it is working as long as the share path is enclosed in double quotes.

I'm working on Ubuntu 20.04 with systemd 245.4-4ubuntu3.6.

Here are my config files:

/etc/systemd/system/mnt-data.mount:
[Unit]
Description=dlsrc-00053

[Mount]
What=//server.private.domain/path1/path\x20with\x20spaces
Where=/mnt/data
Type=cifs
Options=vers=3.0,credentials=/root/.cifscredentials_User1


[Install]
WantedBy=multi-user.target


/etc/systemd/system/mnt-data.automount:
[Unit]
Description=Automount data
Before=remote-fs.target

[Automount]
Where=/mnt/data

[Install]
WantedBy=multi-user.target


Is this a bug, or am just doing it wrong?

Any help is greatly appreciated.

  André


Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
systemd-devel mailing list
systemd-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux