Symptoms
- Unable to pull updates from the Git repository with the error below:
PLESK_ERROR: Cloning Git repository example.git…
Public key for the server at ‘bitbucket.org’ is already known in ‘/var/www/vhosts/example.com/sub.example.com/.ssh/git_known_hosts’.
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists - In Plesk > Domains > example.com > File Manager can be found that the owner of directories and files is
exampleuser
instead ofjohndoe
system user that is set in Domains > example.com> Web Hosting Access > Username *: - It is not possible to set the system user
johndoe
as an owner of the directories and files of theexample.com
domain.
Cause
The users exampleuser
and johndoe
have the same ID in the /etc/passwd
file and also exampleuser
is located above in the list than johndoe
user in the mentioned file.
Resolution
-
Log into the server via SSH.
- Execute the command below to found the ID of the
johndoe
user:# grep “johndoe” /etc/passwd | cut -d: -f3
10001
- Using the user ID found the in step â„–2, run the command below to find a user with the duplicate ID:
# grep “10001” /etc/passwd
exampleuser:x:10001:1003::/var/www/vhosts/example.com:/bin/false
johndoe:x:10001:1003::/var/www/vhosts/example.com:/bin/false -
Using the vi text editor open the
/etc/passwd
file and move the correct system userjohndoe
up in the list (aboveexampleuser
user):-
Before
exampleuser:x:10001:1003::/var/www/vhosts/example.com:/bin/false
johndoe:x:10001:1003::/var/www/vhosts/example.com:/bin/false -
After
johndoe:x:10001:1003::/var/www/vhosts/example.com:/bin/false
exampleuser:x:10001:1003::/var/www/vhosts/example.com:/bin/false
-
- Save changes.
-
Apply proper ownerships to
/var/www/vhosts/example.com/
folder by executing the command:# chown -R johndoe /var/www/vhosts/example.com/