Closed lirees closed 2 years ago
I think you might need to set occ = /var/www/html/occ
in the config because your docker doesn't seem to be working at the nextcloud folder.
If it doesn't work, please check if sudo -uwww-data docker exec -uwww-data a1e6050215ae php occ --version
works. This is basically what the script is doing given your config. In the above command, the first www-data
is the user running the script, which corresponds to www-data.ini
. This user must have the privilege to run docker
. The second www-data
is the user running php
inside the docker, which corresponds to the docker = www-data:a1e6050215ae
line in the configuration. This user should be the one running nextcloud in the docker. php
is hardcoded in the script so please make it available inside the docker (which is usually not a problem). occ
can be configured, as mentioned above.
Thanks for your reply,
i have changed the occ value in ini file and i have add the www-data user into docker group for permit the access to the docker, the command dont' give avy error and retrieve correctly the version of nextcloud
sudo -uwww-data docker exec -uwww-data a1e6050215ae php /var/www/html/occ --version
Nextcloud 15.0.7
and also the systemctl show that the process is active (running) .. perfect
sudo systemctl status nextcloud-inotifyscan@www-data
â nextcloud-inotifyscan@www-data.service - Nextcloud inotify scan daemon for www-data
Loaded: loaded (/etc/systemd/system/nextcloud-inotifyscan@.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2019-05-16 10:00:47 CEST; 6min ago
Main PID: 18634 (nextcloud-inoti)
Tasks: 2 (limit: 4915)
CGroup: /system.slice/system-nextcloud\x2dinotifyscan.slice/nextcloud-inotifyscan@www-data.service
ââ18634 /usr/bin/python /usr/local/bin/nextcloud-inotifyscan --config /etc/nextcloud-inotifyscan/www-data.ini
ââ18696 inotifywait --event=create,modify,move,delete --exclude=/\. --recursive --quiet --format=%e/%f%w/ --monitor /var/lib/univention-appcenter/apps/nextcloud/data/nextcloud-data/Administrator/files
mag 16 10:00:47 server systemd[1]: Started Nextcloud inotify scan daemon for www-data.
mag 16 10:00:48 server nextcloud-inotifyscan[18634]: INFO - watching /var/lib/univention-appcenter/apps/nextcloud/data/nextcloud-data/Administrator/files <=> /Administrator/files
but i found another little problem .. i dont' know if it concerns you, i try to explain
i have a shared folder on lan mapped as external storage in nextcloud and a sub-folder name myfolder
from the lan i create into myfolder a new sub-folder like "test" and the nextcloud-inotifyscan works correctly and i can se immediately the new folder also on cloud system
then i create into myfolder a second sub folder "test2" .. and works without problem all are sync all are visible
i delete the folder "test" form lan .. all are sync correctly.. the folder disappear also on cloud. all it's ok
now if i try to create again a into myfolder a sub folder with a name that i have already used like "test" the nextcloud don't synchronized ... also if i create into myfolder new other sub folders with different names that i never used before like "test5" "test6" the nextcloud not synchronized .. it's stuck until i delete all the sub folder into myfolder and create a new one never used before
I hope i explained myself
Thanks
As far as I know inotify doesn't work on remote filesystems. For external storage, the actual backend storage has to be local for this to work. Are you sure it was inotifyscan that triggered the scan in the first place? To debug this you can take a look of the inotifywait process launched by inotifyscan with something like ps
or htop
and start a inotifywait process yourself. Then, in another terminal, you can try to do the file operations and see if inotifywait outputs anything.
i'm apologize to write you again but after restart of the ucs test machines the script don't run again, i don't understand that happened i have only i have make simply system restart... so i have do it all from scratch sure to solve but don't works .. i report all the steps
1) install ucs update and nextcloud form umc 2) install inotifywait 3) install nextcloud-inotifyscan 4) create www-data.ini in /etc/nextcloud-inotifyscan/
i have tried to use root as user and with file name root.ini, the container id is retrieve from the command docker ps
5) check that all path are correct
6) test the access to the docker container
... and all works
7) and finally run sudo systemctl enable --now nextcloud-inotifyscan@www-data but if i check the systemctl status the service it's stopped
i'm apologize but it's two day i fight without any result
Thanks