开发者

File permissions

开发者 https://www.devze.com 2023-01-11 13:47 出处:网络
HI all I have a question regarding file permissions. I have created a log file lets say \"logfile.log\" which traps certain errors, now in order for it to be writable i set its permissions to 777. Bu

HI all I have a question regarding file permissions.

I have created a log file lets say "logfile.log" which traps certain errors, now in order for it to be writable i set its permissions to 777. But when i do this, it then is acces开发者_JS百科sible to anyone to read via their browser.

how would i go about solving this issue?

thanks


Your log file should never be inside a directory that's served up by your webserver.

Also, mode 777 makes your log file writable to anyone on the system, and also makes it executable. A more sane mode is 644, or 600 to be a bit (actually two bits) more paranoid.

0

精彩评论

暂无评论...
验证码 换一张
取 消