occ commands need sudo prefix

This commit is contained in:
Bob Mottram 2017-11-01 11:11:45 +00:00
parent 6e64539c93
commit fe28c12766
1 changed files with 7 additions and 6 deletions

View File

@ -682,16 +682,17 @@ function install_nextcloud_main {
fi
chown -R www-data:www-data config
chown -R www-data:www-data data
./occ check
./occ status
./occ app:list
./occ app:enable encryption
./occ encryption:enable
sudo -u www-data ./occ check
sudo -u www-data ./occ status
sudo -u www-data ./occ app:list
sudo -u www-data ./occ app:enable encryption
sudo -u www-data ./occ encryption:enable
if [ ! "$?" = "0" ]; then
echo $'Encryption not enabled'
exit 73527
fi
./occ config:system:set appstoreenabled --value=false
sudo -u www-data ./occ encryption:status
sudo -u www-data ./occ config:system:set appstoreenabled --value=false
chmod g+w /var/www/${NEXTCLOUD_DOMAIN_NAME}/htdocs/config/config.php
chown -R www-data:www-data /var/www/${NEXTCLOUD_DOMAIN_NAME}/htdocs
chmod 0644 .htaccess