I’m having such error sometimes when I try to delete some websites:
Sep 13 10:23:42 : cyberpanel : user NOT in sudoers ; TTY=unknown ; PWD=/usr/local/CyberCP/CyberCP ; USER=root ; COMMAND=/bin/rm -f /home/cyberpanel/3942
I’ve noticed that in /home/cyberpanel there are a lot of files consisting of 4 digits like the one above. And some of the are owned by cyberpanel user and others are owned by root. Should I fix this by chown’ing them to cyberpanel.cyberpanel?
I’ve created some test sites and deleted the afterwards. But few still exists.
Apparently cyberpanel user not listed in the sudo group so running sudo fails. And those actions requires root access rights because some of those files are owned by root. Example:
-rw-r–r–. 1 root root 0 сен 5 05:33 8726
-rw-r–r–. 1 cyberpanel cyberpanel 0 авг 9 05:30 8761
-rw-r–r–. 1 cyberpanel cyberpanel 0 авг 21 05:33 8854
I’ve also noticed, that some of the earlier Cyberpanel updates breaks permissions on logs folder of the vHosts. It’s used to be this:
drw-rw-rw-. 2 lscpd lscpd 4096 сен 18 16:57 logs
But now it should be this:
drwxr-x—. 2 root nobody 4096 сен 13 14:00 logs
Causes logs not being written (updated) where websites was created in prior versions of Cyberpanel. Seems like upgrade.py script didn’t handled this.
@CyberPanel it’s CentOS Linux release 7.7.1908 (Core).
Unfortunately I am unsure what exactly have cause this or how to reproduce this issue. I’ve installed CyberPanel (not the Ent version, the one which comes with OpenLiteSpeed) back in Dec 2018 and updated it with upgrade.py script as noted in docs & OS packages once they were available. Maybe that was OpenLiteSpeed update which caused permissions change. I can’t tell for sure unfortunately.
It might happened months ago and I’ve noticed that just now. I’ve already deleted old logs so can’t tell the exact date. But I have complete backups I can restore to check on which date the logs have stopped working if that would help.
I’ve already fixed this by changing owner & permissions of logs dirs and owner of /home/cyberpanel/ files. Seems like this is working fine now for me. So I’m not sure if there is a need for a ticket.