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...

1
  • 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. May 29, 2012 at 19:12

1 Answer 1

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/
2
  • THANK YOU!... for some reason I can't mark this as answered. I have to wait five minutes. I'll come back in a bit
    – Isaac
    May 29, 2012 at 18:56
  • you forgot to mark this as an answered
    – Albert221
    Aug 31, 2017 at 13:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .