1

I have drush installed globally on my VPS (thanks to a previously answered question on here :D), logging in as root all works fine, but using a different user (let's call it drushuser) if I run:

drush @mysite st

I just get the drush version etc, not the drupal info. I assume this is down to the 'root' path in my alias:

'root' => '/home/accountname/public_html',

so logged in as root on the VPS that works - but what should I change it to for drushuser? I'm guessing drush is currently looking in /home/drushuser/home/accountname/public_html and not finding drupal (since it doesn't exist there) so just giving the drush info instead?

I've tried '../accountname/public_html' which didn't work.

1 Answer 1

1

If the drushuser account doesn't have read permission to the directory, it won't be able to run and bootstrap Drupal to get information, so it falls back to displaying the status it can which is Drush status.

If drushuser isn't the same as accountname above, it's very unlikely that drushuser will have access to the home directory of accountname. The root user can read files in every directory, so that is probably why it works as root.

You should be able to run drush as accountname or if you can put the public_html files into a shared location and make sure that the permissions are set so that both users share a group that has read access.

1
  • Thanks eporama, OK will do it logging in as each account - I was trying to use a single user for all rather than upload a public key for each account, but it's not a major job so I'll go ahead with that
    – iain-g
    Commented Feb 6, 2017 at 12:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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