Permissions on /tmp

Bill Freeman ke1g.nh at gmail.com
Wed May 22 17:24:21 EDT 2013


On Wed, May 22, 2013 at 8:26 AM, Michael ODonnell <
michael.odonnell at comcast.net> wrote:

>
>
> > the downside of tmp is that any process can also delete my
> > pid file (as opposed to having to be either root or the user
> > created for the program)
>
> Create a subdirectory of /tmp.  Your PID file will be safe
> in there but still get tidied up on reboot.
>
>
> Many good things to consider.

The sticky bit probably doesn't fly since it isn't "my" box.  It's just
somewhere that folks will want to install my "app".  So I shouldn't be
requiring global (effecting every /tmp user) system changes.  (I'm only
requiring an app specific user and init.d scripts.)

A subdir in /tmp can certainly have my ownership and permissions.  And I
guess they can't delete the directory because it isn't empty, but with
permissions on the parent directory, can't they move it?

Does anyone see significant issues with the approach that the daemon keeps
the PID file open, with a flock() advisory lock on it?  (Deployed and seems
to work.)

Bill
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.gnhlug.org/mailman/private/gnhlug-discuss/attachments/20130522/ef9692d1/attachment-0001.html 


More information about the gnhlug-discuss mailing list