I faced a really big problem. I cannot launch the Nextcloud installation with the web Interface. I searching on the internet for some help and I saw this tutorial with a script for permissions.
I copy the script and executed it. When the script was finished everything was corrupted, I have no shell command available. I restarted my machine and it cannot boot anymore because permission denied on /sbin/init. This is what I have :
run-init: /sbin/init: Permission denied
Target filesystem doesn't have requested /sbin/init.
run-init: /sbin/init: Permission denied
run-init: /etc/init: Permission denied
run-init: /bin/init: No such file or directory
I looking for some advice for this mess : I have tested fsck -f on /dev/sda2 but no luck (It sayed everythink is OK…).
I try to chroot on /dev/sda2 but impossible because I have a permission denied on /bin/bash
If I check the right on this bin :
_rwx-r-x-r-x root root so everything is OK.
The only thing I have found is the root folder has no right. I have modified with command : chmod +rx root/ but the OS doesn’t start either.
The only way which I can think of, that script could have ruined the whole filesystem is, when the variable “ocpath” had been changed to a bad value or changed to blank.
With ocpath='' the find command with chmod would remove all execution bits under / (root). The command chown would then change the ownership of all files and folders: