2

There's a program called imagemagick that can edit images.

It can save files to my home folder with out issues.

It won't save images to a folder /var/www/thumb_nails/

edit: it does work if I execute the script I have the command in. It just wont work when apache2 uses the script... very strange...

Isaac
  • 683
  • The reason it doesn't work specifically when apache2 runs the script is that apache2 runs as a special user account, for security reasons. [Misc]'s answer changes the directory's ownership to www-data to address this. – Eliah Kagan May 29 '12 at 19:12

1 Answers1

2

You need to change the unix permissions on the folder.

Either you set it to be owned by www-data, with :

chown www-data /var/www/thumb_nails/
chmod u+w /var/www/thumb_nails/

Or you use ACL ( a more complete permission system ) to let the user www-data ( ie, the user that apache is using ) write there

setfacl -m u:www-data:rw /var/www/thumb_nails/
Misc
  • 1,072