[Twisted-Python] pidfile in twistd

Jean-Paul Calderone exarkun at divmod.com
Sun Dec 31 09:21:32 EST 2006


On Sun, 31 Dec 2006 17:11:28 +0800, William Hanwoody <hanwoody at gmail.com> wrote:
>when I run a service through twistd
># twistd --pidfile service.pid  -y service.py
>
>in logfile, I see:
> Warning: No permission to delete pid file
>
>Because I run this service as ordinary user, not root:
>application = service.Application("serviceMine", uid, gid)
>, but the owner of pidfile is still root, not ordinary user!
>so when I shutdown this service, this pid file cannot be deleted!
>

File deletion is allowed or disallowed based on permissions on the
directory containing the file, not the permissions of the file itself.

As long as your user has write permission to the directory containing
service.pid twistd should be able to clean it up.

Jean-Paul




More information about the Twisted-Python mailing list