Ran command on my local, user:group is www-data for both. Any ideas?

unlink(/home/elijah/websites/loc.example.com.com/sites/default/files/styles/square_thumbnail/public/april_07_to_may_07_053.jpg):[warning] Permission denied file.inc:2204

Comments

feuillet’s picture

Same issue here, any solutions so far?

moshe weitzman’s picture

Category: bug » support
Status: Active » Postponed (maintainer needs more info)

Run that at the CLI and then make sure you get the same error. Then look at the perms for the file and see why. Not much drush can do here.

greg.1.anderson’s picture

Version: 7.x-5.1 » 8.x-6.x-dev
Status: Postponed (maintainer needs more info) » Closed (won't fix)
Issue tags: +Needs migration

This issue was marked closed (won't fix) because Drush has moved to Github.

If you still need help, please ask your question again on Drupal Answers and then post a link here to the new question. Please also change the status of this issue to closed (duplicate).

Use our Github project for contributing code, or reporting bugs, or requesting features.

elijah lynn’s picture

Issue summary: View changes

I know this is old but it still comes up in search engine results so I am going to post a solution here.

sudo -u www-data -E /absolute/path/to/drush image-flush

The -u specifies to run as the user www-data.
The -E specifies to preserve environment variables.