I had to do a bunch of things to get Drush working on my shared host and it seems to be working, except I get the following error every time I run it:

/home/XXXX/drush/drush: line 26: /bin/uname: Permission denied

If I had to guess, it must have something to do with the jailedshell permissions. Is this anything I need to worry about?

CommentFileSizeAuthor
#4 drush-1784174.patch613 bytesjonhattan
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

greg.1.anderson’s picture

Status: Active » Fixed

Drush is only calling uname to see if you are running on Cygwin, which you are not. As a workaround to this problem, you could make sure that $HOME/bin occurs in your PATH before uname does, and make your own uname script that does nothing.

e.g.: in $HOME/bin/uname

#!/bin/bash

exit 0

Don't forget to chmod +x your uname script.

modctek’s picture

Worked like a charm, thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

jonhattan’s picture

Version: 7.x-5.7 » 8.x-6.x-dev
Status: Closed (fixed) » Needs review
FileSize
613 bytes

I'm also experiencing this in a shared hosting with chrooted ssh access. I think this is a increasingly common scenario.

The warning can be avoid easily if we check the user has rights to execute uname.

greg.1.anderson’s picture

Status: Needs review » Reviewed & tested by the community

I don't have a restricted shared host environment to test #4 on, but it works fine on normal environments, and looks like a good thing to do in general.

greg.1.anderson’s picture

Category: support » feature

Changing classification to feature request - support restricted environments with no access to uname.

jonhattan’s picture

Status: Reviewed & tested by the community » Fixed

Committed to both branches.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.