Python logging, change file owner -
I am using WatchedFileHndler of Python logging facility, the handler sees that the log file has been changed (logroot etc.) ) And opens the file again, then
my process is run as root.
The file is created by the handler every time I see it. is that so?
Thanks
In fact, there is almost no reason to run there Serving as it is almost always a security problem. In addition, the Python OS module provides you:
os.chown (path, uid, gid)
Comments
Post a Comment