Salut tout le monde !
Mon serveur YunoHost
Matériel: Raspberry pi 4
Version de YunoHost: 4.1.7.1
J’ai accès à mon serveur : En SSH | Par la webadmin
Êtes-vous dans un contexte particulier ou avez-vous effectué des modificiations particulières sur votre instance ? : non
Description du problème
Alors, j’ai réussi à installer Yunohost sur mon raspberry pi 4.0. Jusque là, tout va bien !
J’ai installé nextcloud et pas de soucis non plus.
Mais j’ai envie de déplacer nextcloud sur mon disque dur ssd (et pas seulement avoir un dossier sur le ssd et nexcloud entièrement sur la carte sd).
J’ai bien suivi l’opération de montage du disque renseignée ici (Ajouter un stockage externe à son serveur | Yunohost Documentation).
Puis j’ai tenté ceci : https://yunohost.org/fr/applications/docs/nextcloud (en suivant la procédure B).
Mais quand je compare l’output avec ls -al, il y a un problème
root@yunohost:~# ls -la /home/yunohost.app/nextcloud
total 12
drwxr-xr-x 3 root root 4096 Feb 14 20:38 .
drwxr-xr-x 4 root root 4096 Feb 14 20:38 …
drwxr-x— 9 nextcloud nextcloud 4096 Feb 17 19:00 data
root@yunohost:~# ls -al /media/stockage/nextcloud_data/nextcloud
total 12
drwxr-xr-x 3 root root 4096 Feb 17 19:05 .
drwxrwxr-x 3 nextcloud nextcloud 4096 Feb 17 19:05 …
drwxr-x— 9 root root 4096 Feb 17 19:05 data
Et quand je finis la procédure indiquée, à la dernière étape (scan du occdata), cela foire avec le message suivant:
root@yunohost:/var/www/nextcloud# sudo -u nextcloud php7.3 occ files:scan --all
{“reqId”:“RGUx19EebbBLk4zbA1RR”,“level”:3,“time”:“2021-02-17T20:05:56+00:00”,“remoteAddr”:“”,“user”:“–”,“app”:“PHP”,“method”:“”,“url”:“–”,“message”:{“Exception”:“Error”,“Message”:“fopen(/media/stockage/nextcloud_data/nextcloud/data/data_dir_writability_test_602d7724be369.tmp): failed to open stream: Permission denied at /var/www/nextcloud/lib/private/legacy/OC_Util.php#804”,“Code”:0,“Trace”:[{“function”:“onError”,“class”:“OC\Log\ErrorHandler”,“type”:“::”,“args”:[2,“fopen(/media/stockage/nextcloud_data/nextcloud/data/data_dir_writability_test_602d7724be369.tmp): failed to open stream: Permission denied”,“/var/www/nextcloud/lib/private/legacy/OC_Util.php”,804,{“config”:{“class”:“OC\SystemConfig”},“l”:{“class”:“OC\L10N\LazyL10N”},“errors”:[{“error”:“Your data directory is invalid”,“hint”:“Ensure there is a file called ".ocdata" in the root of the data directory.”}],“CONFIG_DATADIRECTORY”:“/media/stockage/nextcloud_data/nextcloud/data”,“webServerRestart”:false,“0”:“And 4 more entries, set log level to debug to see all entries”}]},{“file”:“/var/www/nextcloud/lib/private/legacy/OC_Util.php”,“line”:804,“function”:“fopen”,“args”:[“/media/stockage/nextcloud_data/nextcloud/data/data_dir_writability_test_602d7724be369.tmp”,“w”]},{“file”:“/var/www/nextcloud/lib/private/Console/Application.php”,“line”:161,“function”:“checkServer”,“class”:“OC_Util”,“type”:“::”,“args”:[{“class”:“OC\SystemConfig”}]},{“file”:“/var/www/nextcloud/console.php”,“line”:99,“function”:“loadCommands”,“class”:“OC\Console\Application”,“type”:“->”,“args”:[{“class”:“Symfony\Component\Console\Input\ArgvInput”},{“class”:“Symfony\Component\Console\Output\ConsoleOutput”}]},{“file”:“/var/www/nextcloud/occ”,“line”:11,“args”:[“/var/www/nextcloud/console.php”],“function”:“require_once”}],“File”:“/var/www/nextcloud/lib/private/Log/ErrorHandler.php”,“Line”:91,“CustomMessage”:“–”},“userAgent”:“–”,“version”:“20.0.7.1”}
Your data directory is invalid
Ensure there is a file called “.ocdata” in the root of the data directory.
Your data directory is not writable
Permissions can usually be fixed by giving the webserver write access to the root directory. See Installation wizard — Nextcloud latest Administration Manual latest documentation.
An unhandled exception has been thrown:
Exception: Environment not properly prepared. in /var/www/nextcloud/lib/private/Console/Application.php:168
Stack trace:
#0 /var/www/nextcloud/console.php(99): OC\Console\Application->loadCommands(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#1 /var/www/nextcloud/occ(11): require_once(‘/var/www/nextcl…’)
#2 {main}{“reqId”:“RGUx19EebbBLk4zbA1RR”,“level”:3,“time”:“2021-02-17T20:05:56+00:00”,“remoteAddr”:“”,“user”:“–”,“app”:“PHP”,“method”:“”,“url”:“–”,“message”:“fopen(/media/stockage/nextcloud_data/nextcloud/data/nextcloud.log): failed to open stream: Permission denied at /var/www/nextcloud/lib/private/Log/File.php#85”,“userAgent”:“–”,“version”:“20.0.7.1”}
Voilà voilà … Du coup, j’hésite à me replier vers l’option où nextcloud est sur ma carte sd … Cela dit, je dois encore creuser (et je ne sais pas si c’est lié) mais ni collabora ni onlyoffice ne complète leur installation via yunohost …
Merci déjà pour votre aide !
Nabil