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.

GIT User

Discussion in 'General Discussion' started by JU5TY, Nov 13, 2013.

  1. JU5TY

    JU5TY Member

    Joined:
    Nov 11, 2011
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi

    I've started using GIT on my server running WHM/cPanel, which is now pre-installed.

    Currently I SSH the server as the root user and navigate to the relevant website folder in the home directory and pull any changes from the relevant repository held in BitBucket.

    This works fine, but because the files in that directory were previously uploaded using FTP and the relevant user's credentials, I get an error in the log files saying 'SoftException UID is smaller than min_uid', I've read online that this is because i've used the root user to make changes to that directory.

    I can fix this by changing the ownership of the relevant files, but I don't want to have to do this every time.

    What user should I be using for GIT, surely I don't have to SSH using each users credentials every time?
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

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

    You will need to ensure that you upload/modify files and directories as the account username to avoid this type of problem. You can do this by completing the actions while logged in as the account username, or modifying the ownership values after completing the actions.

    Thank you.
     
  3. JU5TY

    JU5TY Member

    Joined:
    Nov 11, 2011
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Okay thanks, that's fine, but when I SSH the server using the account username and try and connect to the bitbucket repository, I get the following error:

    Permission denied (publickey).

    Is this because that account username doesn't have access to the ssh key which is outside their directory and was created by the root user.

    How do I get around this?
     
  4. fabin

    fabin Active Member

    Joined:
    Nov 27, 2009
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Gods Own Country
    You have to keep the ssh key in the user's home directory and with correct ownership and mode. Most probably, that will fix the Permission denied error.
     
  5. JU5TY

    JU5TY Member

    Joined:
    Nov 11, 2011
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Thanks, although if I keep the SSH key in the users directory, won't that mean I have to create an SSH key every time I add a user/website?
     
  6. JU5TY

    JU5TY Member

    Joined:
    Nov 11, 2011
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Tried what you suggested and it works fine now, thanks.
     
Loading...

Share This Page