简体   繁体   English

什么控制Linux上的php error_log文件属性(权限,所有者,组)?

[英]What controls php error_log file properties (permissions, owner, group) on linux?

I have a Linux environment running Apache/PHP which includes a php script that calls on the php command 我有一个运行Apache / PHP的Linux环境,其中包含一个调用php命令的php脚本

error_log($tx,3,$pathandfilenm)

The result is an error file with the given path/filename, but it has permissions showing 结果是具有给定路径/文件名的错误文件,但它具有权限显示

-rw-r--r-- 1 root      root      161445 Jan 25 00:00 myErrorFile.log.2017-01-25

This file is built automatically by php if it doesn't already exist; 如果该文件尚不存在,则由php自动构建; does anyone know how I can control the owner and group for this file when it's built (as opposed to running some followup scripts to chase new files)? 有没有人知道如何在构建时控制该文件的所有者和组(而不是运行一些后续脚本来追逐新文件)?

Thanks Abe 谢谢安倍晋三

I would guess the group and owner are the same as the user (and its group) that is running the Apache/PHP mentioned. 我猜这个组和所有者与运行所提到的Apache / PHP的用户(及其组)相同。 The rights set are most probably result of the umask. 权限集很可能是umask的结果。

More here 更多这里

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM