I have a dedicated /media/x/F/nextcloud/html:/var/www/html folder on a different HDD.
/nextcloud/html is owned by www-data:
ls -al /media/x/F/nextcloud/html/
total 184
drwxrwxrwx 15 www-data root 4096 Jun 12 13:52 .
drwxrwxrwx 3 www-data x 4096 Jun 12 13:52 ..
drwxrwxrwx 43 www-data root 4096 Jun 12 13:52 3rdparty
drwxrwxrwx 48 www-data root 4096 Jun 12 13:52 apps
-rwxrwxrwx 1 www-data root 19327 Jun 12 13:52 AUTHORS
drwxrwxrwx 2 www-data root 4096 Jun 12 14:08 config
-rwxrwxrwx 1 www-data root 3924 Jun 12 13:52 console.php
-rwxrwxrwx 1 www-data root 34520 Jun 12 13:52 COPYING
drwxrwxrwx 22 www-data root 4096 Jun 12 13:52 core
-rwxrwxrwx 1 www-data root 6260 Jun 12 13:52 cron.php
drwxrwxrwx 4 www-data root 4096 Jun 12 14:22 custom_apps
drwxrwxrwx 5 www-data root 4096 Jun 12 14:21 data
drwxrwxrwx 2 www-data root 12288 Jun 12 13:52 dist
-rwxrwxrwx 1 www-data root 4387 Jun 12 14:08 .htaccess
-rwxrwxrwx 1 www-data root 156 Jun 12 13:52 index.html
-rwxrwxrwx 1 www-data root 3456 Jun 12 13:52 index.php
drwxrwxrwx 6 www-data root 4096 Jun 12 13:52 lib
-rwxrwxrwx 1 www-data root 283 Jun 12 13:52 occ
drwxrwxrwx 2 www-data root 4096 Jun 12 13:52 ocm-provider
drwxrwxrwx 2 www-data root 4096 Jun 12 13:52 ocs
drwxrwxrwx 2 www-data root 4096 Jun 12 13:52 ocs-provider
-rwxrwxrwx 1 www-data root 3139 Jun 12 13:52 public.php
-rwxrwxrwx 1 www-data root 5340 Jun 12 13:52 remote.php
drwxrwxrwx 4 www-data root 4096 Jun 12 13:52 resources
-rwxrwxrwx 1 www-data root 26 Jun 12 13:52 robots.txt
-rwxrwxrwx 1 www-data root 2452 Jun 12 13:52 status.php
drwxrwxrwx 3 www-data root 4096 Jun 12 13:52 themes
-rwxrwxrwx 1 www-data root 101 Jun 12 13:52 .user.ini
-rwxrwxrwx 1 www-data root 382 Jun 12 13:52 version.php
I have executed sudo chown -R www-data:www-data nextcloud/ and sudo chmod -R 770 nextcloud/ on the host. Additionally, id www-data on the host gives 33. This matches what is in the container. Further, in the container, sudo docker exec nextcloud-app ls -al /var/www/html gives
total 184
drwxrwxrwx 15 www-data root 4096 Jun 12 11:52 .
drwxrwxr-x 1 www-data root 4096 Jun 10 03:31 ..
-rwxrwxrwx 1 www-data root 4387 Jun 12 12:08 .htaccess
-rwxrwxrwx 1 www-data root 101 Jun 12 11:52 .user.ini
drwxrwxrwx 43 www-data root 4096 Jun 12 11:52 3rdparty
-rwxrwxrwx 1 www-data root 19327 Jun 12 11:52 AUTHORS
-rwxrwxrwx 1 www-data root 34520 Jun 12 11:52 COPYING
drwxrwxrwx 48 www-data root 4096 Jun 12 11:52 apps
drwxrwxrwx 2 www-data root 4096 Jun 12 12:08 config
-rwxrwxrwx 1 www-data root 3924 Jun 12 11:52 console.php
drwxrwxrwx 22 www-data root 4096 Jun 12 11:52 core
-rwxrwxrwx 1 www-data root 6260 Jun 12 11:52 cron.php
drwxrwxrwx 4 www-data root 4096 Jun 12 12:22 custom_apps
drwxrwxrwx 5 www-data root 4096 Jun 12 12:21 data
drwxrwxrwx 2 www-data root 12288 Jun 12 11:52 dist
-rwxrwxrwx 1 www-data root 156 Jun 12 11:52 index.html
-rwxrwxrwx 1 www-data root 3456 Jun 12 11:52 index.php
drwxrwxrwx 6 www-data root 4096 Jun 12 11:52 lib
-rwxrwxrwx 1 www-data root 283 Jun 12 11:52 occ
drwxrwxrwx 2 www-data root 4096 Jun 12 11:52 ocm-provider
drwxrwxrwx 2 www-data root 4096 Jun 12 11:52 ocs
drwxrwxrwx 2 www-data root 4096 Jun 12 11:52 ocs-provider
-rwxrwxrwx 1 www-data root 3139 Jun 12 11:52 public.php
-rwxrwxrwx 1 www-data root 5340 Jun 12 11:52 remote.php
drwxrwxrwx 4 www-data root 4096 Jun 12 11:52 resources
-rwxrwxrwx 1 www-data root 26 Jun 12 11:52 robots.txt
-rwxrwxrwx 1 www-data root 2452 Jun 12 11:52 status.php
drwxrwxrwx 3 www-data root 4096 Jun 12 11:52 themes
-rwxrwxrwx 1 www-data root 382 Jun 12 11:52 version.php
As far as I can tell, this should be OK, yet I am unable to upload, view, or edit files. I can delete.
Attempting to upload a file via the interface gives “Operation is blocked by access control”. Checking logs, I get multiple errors reporting no such file or directory at /var/www/html/lib/private/Files/Storage/Local.php#395. I clearly have issues with the permissions, but I am not actually sure what I need to do.
@uxb3 looks like your problem not very clear and you need to troubleshoot it your own
I can give you one hint: my system (and what I aware of) - works fine once files and folder owned by www-data:ww-data (33:33) which is not the case for your system. after running
this must be right, but is not the case according to your listing… umask is wrong as well it should be 0750 and not 0777… I’m not sure if this could be a reason… after reviewing your initial post multiple times I don’t see any obvious fault… so I recommend you to start with more simple config e.g. don’t place your data folder on another drive - try a folder in your home directory - maybe there is something wrong with existing mount point…
just for the reference correct permissions can be set with (root inside container - adopt the path in the host)
do you see the “Forbidden” message on the browser?
is there something useful in the server log?
Maybe you ht some silly logical issue like exceeded quota?
Compose file ok to me, except that you really should have redis also, or you may have file locking issues.
Just as a test, could you try putting the docker mount point on your root volume instead of this external drive and see if it works? Could be an issue with the way this external drive is mounted.