GIT User
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?
-
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. 0 -
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? 0 -
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. 0 -
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? 0 -
Tried what you suggested and it works fine now, thanks. 0
Please sign in to leave a comment.
Comments
5 comments