[fhs-discuss] user-specific directories in /run

Miloslav Trmac mitr at redhat.com
Tue May 24 11:15:50 PDT 2011


----- Original Message -----
> > Storing user data under /run *is* controversial, and I object strongly
> > to it.
<snip>
> > /tmp exists specifically for this purpose, and while
> > you've pointed out that problems exist with /tmp, these are entirely
> > self-inflicted and are easily resolvable.
> 
> /tmp exists as place where mkstemps() and mkdtemp() can be used on. This
> should be the only API for /tmp.

To use your terminology, "/tmp itself is an API".  See POSIX:
> The following directory shall exist on conforming systems and shall be used as described:
> 
> /tmp
>    A directory made available for applications that need a place to create temporary files. Applications shall be allowed to create files in this directory, but shall not assume that such files are preserved between invocations of the application. 

> Everything else is problematic for
> security reasons and that's why we should *never* place sockets there.

This statement is too general to be true (mktemp-like use of bind() and using environment variables to point to sockets can be perfectly secure easily enough), and even if it were true, it wouldn't automatically make /run/user the generally accepted solution.
    Mirek


More information about the fhs-discuss mailing list