Public bug reported:

Cannot start systemd service using paths with spaces:

systemd unit file content:
[Unit]
Description=LocalView UPS monitoring service

[Service]
Type=forking
WorkingDirectory=/usr-Socomec\x20UPS-LocalView
ExecStart=/usr-Socomec\x20UPS-LocalView-StartApp.sh

[Install]
WantedBy=multi-user.target

Although systemd-escape converts "/usr/Socomec UPS/LocalView" path to 
usr-Socomec\x20UPS-LocalView,
systemd complains it is not an absolute path when the '/' in front of it is 
missing in the unit file:

systemd[1]: /etc/systemd/system/localview.service:6: Working directory
path 'usr-Socomec\x20UPS-LocalView' is not absolute.

The same applies for ExecStart entry.

When the syntax check was satisfied I tried to run the service:

systemd[11574]: localview.service: Changing to the requested working directory 
failed: No such file or directory
systemd[11574]: localview.service: Failed at step CHDIR spawning /usr-Socomec 
UPS-LocalView-StartApp.sh: No such file or directory

# ll "/usr/Socomec UPS/LocalView/StartApp.sh"
-rwx--x--x 1 root root 220 kvě 26 17:27 '/usr/Socomec 
UPS/LocalView/StartApp.sh'*

Unescaped path in the unit file obviously does not work either.

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: systemd 237-3ubuntu10
ProcVersionSignature: Ubuntu 4.15.0-20.21-generic 4.15.17
Uname: Linux 4.15.0-20-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
ApportVersion: 2.20.9-0ubuntu7
Architecture: amd64
CurrentDesktop: XFCE
Date: Sat May 26 18:53:31 2018
InstallationDate: Installed on 2018-05-25 (1 days ago)
InstallationMedia: Xubuntu 18.04 LTS "Bionic Beaver" - Release amd64 (20180426)
MachineType: Gigabyte Technology Co., Ltd. EP45-DS3R
ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-4.15.0-20-generic 
root=UUID=cc5a6c33-5b50-42bf-adc9-d3f8e8dd328e ro quiet splash vt.handoff=1
SourcePackage: systemd
SystemdDelta:
 [EXTENDED]   /lib/systemd/system/rc-local.service → 
/lib/systemd/system/rc-local.service.d/debian.conf
 [EXTENDED]   /lib/systemd/system/user@.service → 
/lib/systemd/system/user@.service.d/timeout.conf
 
 2 overridden configuration files found.
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 09/03/2009
dmi.bios.vendor: Award Software International, Inc.
dmi.bios.version: F11e
dmi.board.name: EP45-DS3R
dmi.board.vendor: Gigabyte Technology Co., Ltd.
dmi.chassis.type: 3
dmi.chassis.vendor: Gigabyte Technology Co., Ltd.
dmi.modalias: 
dmi:bvnAwardSoftwareInternational,Inc.:bvrF11e:bd09/03/2009:svnGigabyteTechnologyCo.,Ltd.:pnEP45-DS3R:pvr:rvnGigabyteTechnologyCo.,Ltd.:rnEP45-DS3R:rvr:cvnGigabyteTechnologyCo.,Ltd.:ct3:cvr:
dmi.product.name: EP45-DS3R
dmi.sys.vendor: Gigabyte Technology Co., Ltd.

** Affects: systemd (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug bionic

-- 
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/1773556

Title:
  systemd does not work with escaped paths

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1773556/+subscriptions

-- 
desktop-bugs mailing list
desktop-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs

Reply via email to