Hello!
I run Plesk onyx with multiple domains. On 1 subdomain i have Nextcloud running.
It runs fine with the default permissions but, if i want to set secure permissions i get a 403 error.
Script i run:
Now when I change the file and folder permission to:
It seems to work again, so the guest/world permission bit seems to be the problem here.
Is there anything I can perform to have the suggested permissions and access the site?
Already tried this question in the Nextcloud community but... no success yet.
Thank you!
I run Plesk onyx with multiple domains. On 1 subdomain i have Nextcloud running.
It runs fine with the default permissions but, if i want to set secure permissions i get a 403 error.
Script i run:
Code:
#!/bin/bash
NCPATH=/var/www/vhosts/domain.nl/cloud.domain.nl
NCDATA=/ncdata
htuser='htuser created in plesk'
htgroup='psacln'
rootuser='root'
printf "Creating possible missing Directories\n"
mkdir -p $NCPATH/data
mkdir -p $NCPATH/updater
mkdir -p $NCDATA
printf "chmod Files and Directories\n"
find ${NCPATH}/ -type f -print0 | xargs -0 chmod 0640
find ${NCPATH}/ -type d -print0 | xargs -0 chmod 0750
printf "chown Directories\n"
chown -R ${rootuser}:${htgroup} ${NCPATH}/
chown -R ${htuser}:${htgroup} ${NCPATH}/apps/
chown -R ${htuser}:${htgroup} ${NCPATH}/config/
chown -R ${htuser}:${htgroup} ${NCDATA}/
chown -R ${htuser}:${htgroup} ${NCPATH}/themes/
chown -R ${htuser}:${htgroup} ${NCPATH}/updater/
chmod +x ${NCPATH}/occ
printf "chmod/chown .htaccess\n"
if [ -f ${NCPATH}/.htaccess ]
then
chmod 0644 ${NCPATH}/.htaccess
chown ${rootuser}:${htgroup} ${NCPATH}/.htaccess
fi
if [ -f ${NCDATA}/.htaccess ]
then
chmod 0644 ${NCDATA}/.htaccess
chown ${rootuser}:${htgroup} ${NCDATA}/.htaccess
fi
Now when I change the file and folder permission to:
Code:
find ${NCPATH}/ -type f -print0 | xargs -0 chmod 0644
find ${NCPATH}/ -type d -print0 | xargs -0 chmod 0755
It seems to work again, so the guest/world permission bit seems to be the problem here.
Is there anything I can perform to have the suggested permissions and access the site?
Already tried this question in the Nextcloud community but... no success yet.
Thank you!