I do that either using sudo to the Apache user
sudo -u _www drush cc all
or by putting ACLs on the drupal files allowing writing by another user:
sudo setfacl -R -m u:tim:rwX sites/default/files sudo setfacl -R -m d:u:tim:rwX sites/default/files
drush cc all
However, I gather that setfacl is not generally available on Mac OS X.
On 6/28/13 1:35 PM, Tim Johnson wrote:
I'm getting file permission errors while trying to clear caches using drush.
FYI: This is on my own workstation. OS = Mac OSX drush version 5.8 Running as user tim with : linus:~ tim$ id ...,70(_www),...
apache is user _www
files involved are user:group _www:_www permissions are 664 on files, 755 on the directory, which is sites/default/files/js
I note that sites/default/files/css is being handled without error and has permissions of 775
I want to automate this process for the command line as much as possible so would like a solution that doesn't entail clearing from the site itself
Would there be anything wrong with changing directory permissions on sites/default/files/js to 775? (My workstation is closed to the outside world)
TIA