Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

share|improve this question
    
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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.