File permissions
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.
精彩评论