[Bug 1612340] [NEW] systemd user instance doesn't respect PrivateTmp option in unit file
Björn "BG" Nilsson
djupblue at gmail.com
Thu Aug 11 16:33:54 UTC 2016
Public bug reported:
When setting the option PrivateTmp to "yes" in a unit file, I expect
that files created by the service shouldn't be visible to the outside
world.
To reproduce:
$ systemctl --user edit --full privatetmpdir.service
[Unit]
Description=TestService
[Service]
Type=oneshot
ExecStart=/usr/bin/touch /tmp/1234.txt
PrivateTmp=yes
$ ls /tmp/1234.txt
ls: cannot access '/tmp/1234.txt': No such file or directory
$ systemctl --user restart privatetmpdir.service
$ ls /tmp/1234.txt
/tmp/1234.txt
here i expect there to not be a file "/tmp/1234.txt", but there is.
Running the same unit file on the system systemd behaves as expected,
the file in /tmp is not visible to the outside world.
Ubuntu 16.04.1 LTS
Kernel: 4.4.0-34-generic
Package: systemd
Version: 229-4ubuntu7
** Affects: systemd (Ubuntu)
Importance: Undecided
Status: New
** Description changed:
When setting the option PrivateTmp to "yes" in a unit file, I expect
- that files created by the service should be visible to the outside
+ that files created by the service shouldn't be visible to the outside
world.
To reproduce:
$ systemctl --user edit --full privatetmpdir.service
[Unit]
Description=TestService
[Service]
Type=oneshot
ExecStart=/usr/bin/touch /tmp/1234.txt
PrivateTmp=yes
$ ls /tmp/1234.txt
ls: cannot access '/tmp/1234.txt': No such file or directory
- $ systemctl --user restart privatetmpdir.service
+ $ systemctl --user restart privatetmpdir.service
$ ls /tmp/1234.txt
/tmp/1234.txt
here i expect there to not be a file "/tmp/1234.txt", but there is.
Running the same unit file on the system systemd behaves as expected,
the file in /tmp is not visible to the outside world.
Ubuntu 16.04.1 LTS
Kernel: 4.4.0-34-generic
Package: systemd
Version: 229-4ubuntu7
** Summary changed:
- systemd user instance doessn't respect PrivateTmp option in unit file
+ systemd user instance doesn't respect PrivateTmp option in unit file
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/1612340
Title:
systemd user instance doesn't respect PrivateTmp option in unit file
Status in systemd package in Ubuntu:
New
Bug description:
When setting the option PrivateTmp to "yes" in a unit file, I expect
that files created by the service shouldn't be visible to the outside
world.
To reproduce:
$ systemctl --user edit --full privatetmpdir.service
[Unit]
Description=TestService
[Service]
Type=oneshot
ExecStart=/usr/bin/touch /tmp/1234.txt
PrivateTmp=yes
$ ls /tmp/1234.txt
ls: cannot access '/tmp/1234.txt': No such file or directory
$ systemctl --user restart privatetmpdir.service
$ ls /tmp/1234.txt
/tmp/1234.txt
here i expect there to not be a file "/tmp/1234.txt", but there is.
Running the same unit file on the system systemd behaves as expected,
the file in /tmp is not visible to the outside world.
Ubuntu 16.04.1 LTS
Kernel: 4.4.0-34-generic
Package: systemd
Version: 229-4ubuntu7
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1612340/+subscriptions
More information about the foundations-bugs
mailing list