linux - ubuntu apache2 日志文件权限

标签 linux apache ubuntu

我很好奇。 我的 apache2 网络服务器以用户“www-data”运行。 但是目录“/var/log/apache2”没有用户“www-data”的写入权限

root@ubuntu:~# ls -al /var/log/apache2
total 10960
drwxr-x---  2 root adm     4096 Sep 30 23:30 .
drwxr-xr-x 10 root root    4096 Sep 30 06:25 ..
-rw-r-----  1 root adm  2114548 Sep 30 23:34 access.log

即使apache2作为www-data运行,它如何创建access.log文件? 我在这里遗漏了什么吗?

一些建议会很好。 预先感谢您

最佳答案

日志写入由 syslog 服务处理,syslog 通常是 ubuntu 计算机上 adm 组的成员。因此许可是这样的。

关于linux - ubuntu apache2 日志文件权限,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26135452/

相关文章:

C : Redirect child process output to other child process input and stdout

apache - IndexIgnore *或选项-Indexes

ruby-on-rails - 为什么 Rails with Passenger/nginx 只能在开发模式下工作?没有可用的日志

apache - 我的 Web 应用程序保存的文件与父级具有不同的文件权限

PHP fatal error : Maximum execution time of -1 seconds exceeded in

postgresql - 如何在 PostgreSQL 16 中设置 "VARSIZE"和 "SET_VARSIZE"

php - Apache权限问题无法上传文件

c++ - 我输入了 g++ -o main.cpp main 并且丢失了我的程序

python - 使用 python 将外部文件中的数据保存到列表中

apache - 一台服务器上的多个tomcat版本