You are not logged in.
Hello everybody,
I have Apache and php5 installed (from the default repo's). Ive written an script which resizes images en creates thumbnails. Well i get this strange error:
Warning: mkdir() [function.mkdir]: Permission denied in /home/httpd/html/resize.php on line 11
Warning: mkdir() [function.mkdir]: Permission denied in /home/httpd/html/resize.php on line 14
data/groep.jpg
Warning: imagejpeg() [function.imagejpeg]: Unable to open 'resized/groep.jpg' for writing in /home/httpd/html/functions.php on line 10
data/groep.jpg
Warning: imagejpeg() [function.imagejpeg]: Unable to open 'resized-tb/groep.jpg' for writing in /home/httpd/html/functions.php on line 10
data/pa211933.jpg
...
...
...
etc etc
somehow php/apache can't cannot write in this directory. I have tried it in de document root and in the userdir.
Has anybody any idea how to solve this problem?
Greetinx Atze
Offline
your apache is running as nobody:nobody out of the box. You prolly have other permissions on the files in /home/httpd/html/*
So you have apermission error.
-neri
Offline
Yea, i got that idea already, but how do i solve this problem without changing premissions everytime?
Offline
Yea, i got that idea already, but how do i solve this problem without changing premissions everytime?
Files in the wwwroot are always meant to be oned by the user running the daemon, except you have certain tasks you want prevent from happen
if this is your developerbox and not the actual online project you can make restrictions a bit lower, Your options:
- run apache as "yourname":users
- make yourself member of the nobody group and make the file permissions 664 instead of 644
- ... many others here
-neri
Offline