The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Can't run script as user

Discussion in 'General Discussion' started by wrender, Nov 27, 2015.

  1. wrender

    wrender Well-Known Member

    Joined:
    Sep 29, 2007
    Messages:
    69
    Likes Received:
    3
    Trophy Points:
    8
    I know this is not cPanel related really, but I thought this would be a good place to post this. I've installed Drush 8 on a cPanel/Centos 7 server using the instructions here:
    docs.drush.org/en/master/install/

    Previously I had installed Drush 6.2 using Pear and it worked fine, but it is no longer supported to install that way.

    When I run a drush command on a Drupal website as root, it works but when I try to run it as a regular cPanel user account it fails with:

    Code:
    Access denied for user 'kenji'@'localhost'
    Code:
    Command pm-refresh needs a higher bootstrap level to run - you will need to invoke drush from a more functional Drupal environment to run[error]
    this command.
    
    Or when running other commands:
    Code:
    No Drupal site found
    It seems as though I'm missing some sort of permissions that are only available as root.
     
    #1 wrender, Nov 27, 2015
    Last edited: Nov 27, 2015
  2. wrender

    wrender Well-Known Member

    Joined:
    Sep 29, 2007
    Messages:
    69
    Likes Received:
    3
    Trophy Points:
    8
    I was able to find the issue. On this cPanel server in particular there were .my.cnf files in each user's home directory. Drush 8 seems to take precedence on this file and tries to use it to bootstrap Drupal. I just deleted this folder in each home folder and now Drush 8 is working on this server. Hope this helps somebody else.
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page