www-data can upload a file but cant move it after the upload action

Posted by user70058 on Server Fault See other posts from Server Fault or by user70058
Published on 2011-02-09T04:54:34Z Indexed on 2011/02/09 7:26 UTC
Read the original article Hit count: 276

Filed under:
|
|
|
|

I am currently running Apache and PHP on Ubuntu. I have a page where a user is supposed to upload a profile image. The action on the backend is supposed to work like this:

  1. Upload file to user directory -- WORKS!

  2. Refer to the uploaded file and create a thumbnail in directory thumbs -- DOES NOT WORK

www-data has write access to directory thumbs. My guess is that www-data for some reason does not have proper access to the file that was uploaded.

UPLOADED FILE PERMISSIONS

-rw-r--r-- 1 www-data www-data 47057 Feb  8 23:24 0181c6e0973eb19cb0d98521a6fe1d9e71cd6daa.jpg

THUMBS DIRECTORY PERMISSIONS

drwxr-sr-x 2 www-data www-data  4096 Feb  8 23:23 thumbs

Im at lost here. I'm new to Ubuntu as well. Any help would be greatly appreciated!

© Server Fault or respective owner

Related posts about ubuntu

Related posts about apache2