문제

I've create a small php application with log4php on my work desktop machine running windows 7 and net. it works fine, daily file it's been created and log are in.

NOw i'm on my laptop running ubuntu 11,04. i originally gave persmission 755 to the folder Integrator (name of the app) and subfolder under /var/www/Ingrator.after realizing this

Mon May 16 18:03:44 2011] [error] [client 127.0.0.1] PHP Warning: fopen(./logs/daily_20110516.log): failed to open stream: Permission denied in /var/www/Integrator/lib/log4php/appenders/LoggerAppenderFile.php on line 77

permission issue in the apache log, i've changed the owner to be the current owner, but this. it gives the same error.now it's even with the permission 777. it's still persistent. So i'm a little surprise.how can i fix that? thanks for reading this.

도움이 되었습니까?

해결책

The error says it's trying to open the file, which means that the Apache user doesn't have permission to the file. Basically, it can open the folder and see that the file is there, but can't do anything with it, because permissions for folders are separate from permissions for files.

Make sure the file is owned by www-data, in the www-data group, or has read/write permissions that www-data can use (assuming you left the Apache user as www-data, if not, use the Apache user you've set).

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top