I am using jQuery uploadify to dynamically load pictures to a website.

The files were not being loaded into the uploaded_image dir on the server

at this stage the folder had permision 755 for root:root

I then changed ownership on the folder to 755 for www-data:myuser

and the images still did not display.

Eventually, I had to change permissions to 770 for www-data:myuser before the files could be displayed.

I am not sure why it did not work when the www-data user had full permissions. I assumed that all server side php scripts were run under the www-data user.

Does anyone know why I had to grant write privileges to myuser as well before the image files could be written to the folder? (it does pose a small security risk, if the script is running as a user other than www-data on the server).

I am running Ubuntu 10.0.4 LTS

link|improve this question

29% accept rate
Are you running SuPHP or another similiar CGI-based loader? Some loaders (such as SuPHP) execute PHP under a different user than the webserver runs under much like SuExec does for CGI scripts. What permissions do you have on the files themselves? – Garrett Oct 31 '11 at 23:35
feedback

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown

Browse other questions tagged or ask your own question.