FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.

» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

LinkBack Thread Tools
Old 07-04-2010, 07:00 AM
"Robert P. J. Day"
Default the proper owner/group for /var/log and /var/run entries?

not sure if this is the right forum but i have a couple questions
about the proper attributes for /var/log and /var/run entries for a
newly-installed package (and perhaps other /var directories as well).

i'm playing with a new package, it comes in .deb form, call it
"pkg". as part of the installation process, it creates two new
directories with the equivalent owner/group:

d pkg pkg /var/run/pkg
d pkg pkg /var/log/pkg

the purpose of the above is obvious -- those /var directories will
keep track of log info and PID info for that package. and since the
package runs with owner and group of "pkg" and "pkg", it will clearly
have the access rights to write contents into those directories.
also, since the installation process runs as root, installation will
have the right to *create* those directories in the first place. so
far, so good? but here's where something has gone wrong.

for reasons i don't understand, during shutdown or system reboot or
*something*, those two directories disappeared. i don't see why, they
just did. and once they did, trying to *start* that package again is
clearly going to run into all sorts of trouble since, because the
package runs with the owner and group of "pkg" and "pkg", it will
certainly not be allowed to *recreate* those directories under
/var/log and /var/run -- that requires root privilege, yes? and
without those directories, i won't have any logging info, and i won't
be able to properly run the init script if it needs to query the
package's PID (since there won't be any /var/run/pkg/pid file).

does any of this make sense? i'm looking at the standard
directories in /var/log and /var/run, and i see very few that have
similar attributes to the ones i mentioned here. one exception is
/var/run/avahi-daemon, which has owner and group avahi and avahi, so
it's possible that it could end up in the same weird situation.

am i overly worried about this? typically, once the appropriate
directories are created at install time, i would expect them to stay
there so this quirk would never arise. and i have no idea how the
problem came about in the first place, but somehow it did and it's
caused exactly the problem as i described it.

thoughts? recommendations? link to web page that explains best



================================================== ======================
Robert P. J. Day Waterloo, Ontario, CANADA

Top-notch, inexpensive online Linux/OSS/kernel courses

Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
================================================== ======================

ubuntu-users mailing list
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

Thread Tools

All times are GMT. The time now is 06:57 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org