Hi! Help me please. Permissions to all folders on an Ubuntu 20.04 server with OLS have been lost by mistake. Some rights I restored Cyberpanel opens, but nothing works and websites do not open. There is SSH access. Please help restore the rights that were by default.
P.S. Almost all folders and files have root:root (user:group)
For websites, the “fix permissions” button at the website file manager:
Cyberpanel → List websites → File manager → Fix permissions
Should fix all the permissions for the website.
Now, regarding the permissions of cyberpanel core, perhaps your best option would be to run the upgrader, as the upgrader does fix some permissions.
Not sure if it will fix all, but you can use it as a starting point.
Thanks for reply. File Manager opens but folders and files are not displayed. I run upgrade, but problems remain. Perhaps you can tell me how to restore permissions for the file manager, so that later I can do Fix Permissions.
File manager not showing the files it’s normal, as the files don’t have the correct permissions to the website owner.
At the file manager, top right click the “Fix permissions” button, and then refresh the page.
See if the website files now appear
Fix permissions not working.
Try using the upgrader then, if at the end it will doesn’t work, I will try to make a script to fix them all
I repeated the upgrader script, but nothing has changed. Also I did “systemctl restart lsws” and “systemctl restart lscpd” after upgrader.
This is not ideal as I didn’t test it, it will probably give some issues of missing files but those you can ignore.
Do these commands to restore permissions using ACL:
1 - Install ACL (apt / dnf / yum install-y acl) according to your OS.
2 - Run:
sh <(curl https://raw.githubusercontent.com/tbaldur/cyberpanel-mods/main/fix_permissions.sh || wget -O - https://raw.githubusercontent.com/tbaldur/cyberpanel-mods/main/fix_permissions.sh)
If it doesn’t work, check the link to go to Github and manually execute the steps.
Thanks for script, but it not help((
Ah sad, thought that should help with the core permissions.
Can you check if the “fix permissions” button on the file manager still does nothing?
Cyberpanel stopped opening after the script. White screen
Can you show it at anydesk? I will compare the permissions with mine and change them as necessary
This topic was automatically closed 3 hours after the last reply. New replies are no longer allowed.