Hello, facing a problem with scanning files.
I have setup nextcloud in a docker container that is on a virtual machine and created a volume for the data.
Now since space is scarce I mounted a shared folder in the VM which contains my comic books:
xxxx@ubuntu:~$ ls -l /mnt/hgfs
drwxrwxrwx 1 root root 4096 Sep 12 13:52 Comic
drwxr-xr-x 2 www-data www-data 4096 Sep 13 23:19 ./
drwxr-xr-x 5 www-data www-data 4096 Sep 13 23:00 …/
lrwxrwxrwx 1 www-data www-data 16 Sep 13 23:19 Comic -> /mnt/hgfs/Comic//
-rw-r–r-- 1 www-data www-data 331285 Sep 13 23:00 DFBZGoSV0AICqC_.mp4
Comic is symbolic link to my mount point /mnt/hgfs/Comic - accessing it I can see all of them so that’s good.
Now I am facing an issue with VMWARE where we can’t change the owner of a shared folder and it’s content from Windows OS (it stays as root), if I do a chown -vR www-data:www-data I see in the verbose output the attempt to change them all but it is reverted immediately back to root:root - so I can’t change them using chown.
Now I tried to mount the shared folder with gid 33 (www-data) in /etc/fstab but it fails and when rebooting the vm get’s stuck because of this line
– So vmware side there is no option to change the ownership from root to www-data.
The only option remains with nextcloud, and therefore I am wondering if thee is any possibility to run a scan and discover files that are owned by root ?
sudo docker exec --user www-data nextcloud php occ files:scan --all -v
The files and folders are scanned again and it does scan the ones that are owned by www-data but not the symlink to the Comic folder and what is contains
If I try on the other hand using root user I get:
xxxx@ubuntu:~/docker/nextcloud/data/xxxx/files/Comics$ sudo docker exec --user root nextcloud php occ files:scan --all -v Console has to be executed with the user that owns the file config/config.php Current user: root Owner of config.php: www-data Try adding 'sudo -u www-data ' to the beginning of the command (without the single quotes)
So here I decided to chown the config.php file to root:root just for the test and it does scan the files again but not taking the symlink into account (note here changing owner of the config.php prevents the GUI to work):
xxxx@ubuntu:~/docker/nextcloud/data/xxxx/files/Comics$ sudo docker exec --user root nextcloud php occ files:scan --all -v
Starting scan for user 1 out of 1 (xxxx)
File /xxxx/files/Nextcloud Manual.pdf
| Folders | Files | Elapsed time |
| 5 | 8 | 00:00:00 |
Is there is any possibility to make the scan take into account root owned files and folders ?