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 Desktop 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 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1612340/+subscriptions -- desktop-bugs mailing list desktop-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/desktop-bugs