亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

How apache logs
怪我咯
怪我咯 2017-05-16 17:03:06
0
1
686

On Linux systems, apache runs as the www-data (default) user, and its user group is also www-data.

But I found that the apache log directory /var/log/apache belongs to root, and the group is adm

www-data does not have write permissions on the log directory, and it is not a user of the adm group and does not even have read permissions.

But we found that there is an apache2 process running as root, which should be the main process. Are the logs of all child processes first passed to the main process through process communication and then recorded? Or is there some other mechanism?

怪我咯
怪我咯

走同樣的路,發(fā)現(xiàn)不同的人生

reply all(1)
為情所困

I don’t have Apache httpd here, so I wrote a program myself and tried it. Data can still be written to the file after write 時是不檢查權(quán)限的,也就是說只要日志文件打開成功了,那么再改變用戶 ID(setuid). Of course, in this case, how to reopen the log file is a problem. Just look at the source code of Apache httpd. A simple strace may reveal something.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template