Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

share|improve this question
    
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 Answer 1

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/
share|improve this answer
    
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 '12 at 18:56

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.