Best way to restore correct permissions in /var/www on NextCloudPi image

I followed the response in this support question: Nextcloud 12 - strong directory permissions
and now it is working again.

Here is what I did to get my NextCloudPi working again…

Step 1 >> sudo chown www-data:www-data -R /var/www
Step 2 >> cd /usr/bin
Step 3 >> nano setup_secure_permissions_nextcloud.sh
Step 4 Copied this script: setup_secure_permissions_nextcloud.sh into the terminal window and saved the file
Step 5 >> chmod +x /usr/bin/setup_secure_permissions_nextcloud.sh
Step 6 >> ./setup_secure_permissions_nextcloud.sh

This fixed the permissions back to strong permissions for the whole /var/www folder.

Flex

1 Like