JU5TY

Member
Nov 11, 2011
14
0
51
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?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,201
363
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.
 

JU5TY

Member
Nov 11, 2011
14
0
51
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?
 

fabin

Active Member
Nov 27, 2009
29
0
51
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.
 

JU5TY

Member
Nov 11, 2011
14
0
51
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?