Hi guys!
I’m currently facing an issue with every website I create under CyberPanel. My current websites all work fine and I can also create FTP users for them, no issues with that. However, for any new website I create, they don’t work, they all show a 404 error, and I cannot upload any files (except as root) because I cannot create an FTP user for them. Upon checking the ownership, every new website creates its folder in the server with root:root as the owner instead of using the user that it creates for them. Also, trying to create an FTP account for the website returns an error because it says the system cannot found the user (and it’s the user created for the website, the one that should appear as the owner).
For example:
Website: oldwebsite
Owner of the folders automatically assigned by CyberPanel: oldweb1234
SSH user created for that website in Manage website / SSH: oldweb1234
Can create FTP accounts?: Yes, no issues
Is the website accessible?: Yes, no. issues
Website: newwebsite
Owner of the folders automatically assigned by CyberPanel: root
SSH user created for that website in Manage website / SSH: newweb1234
Can create FTP accounts?: No. I get the error “getpwnam(): name not found: newweb1234”
Is the website accessible?: No, it shows a 404 error message.
Additionally, if I try to fix permissions using SSH, this is the error I get:
chown: invalid user: ‘newer1234:newweb1234’ (even if the user is supposed to be the correct one, as shown in the SSH section managing the website)
Entering this command via SSH list all the users but the user newweb1234 does not exist: getent passwd | cut -d: -f1
However, entering this command via SSH says this:
Command: adduser newweb1234
Message: adduser: group newweb1234 exists - if you want to add this user to that group, use -g.
Lastly, this happens if I try to add the user to the corresponding group:
adduser -g newweb1234 newweb1234
adduser: existing lock file /etc/shadow.lock without a PID
adduser: cannot lock /etc/shadow; try again later.
I’m using CyberPanel 2.4.5
Commit: 00d28b5a1cc935383e8623b08cfc0261bd9119c0
SOLVED: Deleting the file shadow.lock in /etc/ solved the issue. I was able to add the user to the group and then create an FTP account. Finally!