[systemd-devel] PrivateDevices=true blocks use of ttys?

Alison Chaiken alison at she-devel.com
Fri Dec 26 13:37:58 PST 2014


On Fedora 21, I created a unit file in which I included
'PrivateDevices=true'.    When I attempt to start the unit from the text
console, the unit fails, and 'systemctl status -l' reports:

startx[2754]: (EE) xf86OpenConsole: Cannot open /dev/tty0 (No such file or
directory)


When I take 'PrivateDevices=true' out of the unit file, it works fine.
The man page for systemd.exec reads

PrivateDevices=
Takes a boolean argument. If true, sets up a new /dev namespace for the
executed processes and only adds API pseudo devices such as /dev/null,
/dev/zero or /dev/random (as well as the pseudo TTY subsystem) to it, but
no physical devices such as /dev/sda.


Isn't /dev/tty0 a pseudo TTY?   Shouldn't a service that has
'PrivateDevices=true' be able to access /dev/tty0?   I'm willing to
investigate further to see if there's a bug, but want to make sure that I
understand the expected behavior first

Best wishes,
Alison

-- 
Alison Chaiken                           alison at she-devel.com
650-279-5600                            http://{she-devel.com,
exerciseforthereader.org}
Never underestimate the cleverness of advertisers, or mischief makers, or
criminals.  -- Don Norman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20141226/8a8c7a08/attachment.html>


More information about the systemd-devel mailing list