[Twisted-Python] pidfile in twistd
![](https://secure.gravatar.com/avatar/1562a4e34e21f81da6af39831c4e760c.jpg?s=120&d=mm&r=g)
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! -- _______________________________________________________________ William Hanwoody hanwoody@gmail.com A senior Linux engineer, like system integrate My blog - hanwoody.livejournal.com _______________________________________________________________
![](https://secure.gravatar.com/avatar/7ed9784cbb1ba1ef75454034b3a8e6a1.jpg?s=120&d=mm&r=g)
On Sun, 31 Dec 2006 17:11:28 +0800, William Hanwoody <hanwoody@gmail.com> wrote:
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
![](https://secure.gravatar.com/avatar/7ed9784cbb1ba1ef75454034b3a8e6a1.jpg?s=120&d=mm&r=g)
On Sun, 31 Dec 2006 17:11:28 +0800, William Hanwoody <hanwoody@gmail.com> wrote:
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
participants (2)
-
Jean-Paul Calderone
-
William Hanwoody