Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

You must log in to answer this question.

Browse other questions tagged .