Re: [chrony-users] chronyd not deleting specified pidfile on exit

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-users Archives ]


On Mon, Jul 04, 2022 at 03:00:14AM +0000, Elliott, Robert (Servers) wrote:
> If running chrony in linux with a specified pidfile:
>     pidfile /home/orange/timeperf/chrony-local-run/chrony.pidfile

> The parent of that directory does have different permissions and might
> be the reason for the different behavior.

All directories in the path to the pidfile need to have the "x"
permission in order for chronyd to access the one containing the
pidfile. If /home/orange is owned by orange:orange and it doesn't have
"x" for all, you would need to change it with "chmod 751 /home/orange".

Normally, you wouldn't want other users to be able to access
subdirectories in your home. It's better to run chronyd in some other
path, e.g. in /tmp/chrony, but you need to check its ownership and
permissions to avoid writing to a directory controlled by another
user.

> Perhaps chronyd should change that file owner from root to the
> specified user before dropping root privileges (if -u or user is
> enabled), so it can be sure to delete the file later?

That shouldn't make a difference. When chronyd is removing the
pidfile, it's modifying the directory, not the file.

-- 
Miroslav Lichvar


-- 
To unsubscribe email chrony-users-request@xxxxxxxxxxxxxxxxxxxx 
with "unsubscribe" in the subject.
For help email chrony-users-request@xxxxxxxxxxxxxxxxxxxx 
with "help" in the subject.
Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/