Synology Nextcloud comment ajouter des fichiers et dossiers déjà existants sur le synology ?

erikdenice

Nouveau membre
14 Juin 2022
8
0
1
Bonjour, j'ai un Syno avec déjà des dossier et fichiers présents, j'ai installer NextCloud, impec mais lorsque je transfère depuis le NAS les fichiers du/dossier de leur emplacement actuel vers /web/nextcloud/data/user/files, la ou sont stockées les fichiers/dossier de NextCloud, il n'apparaissent pas dans ma synchro, je pense qu'il faut probablement demander à NC de les indéxer mais comment faire de manière à ce qu'ils puissent apparaitre pour être dispo pour la synchro, je ne veux pas passr par external storage.?
Un peu d'aide serait la bienvenue...
merci d'avance
Erik
 
Salut,
je ne sais pas si cela est applicable pour ton intallation, mais effectivement, Nextcloud n'indexe que les fichiers qui passe a travers un de ses clients ( Android, Desktop, ... ) les fichiers copier/coller dans ses dossiers directement ne sont pas vu.

Il faut forcer l’indexation, comme cela :

Forcer pour tous les utilisateurs :
php /config/www/nextcloud/occ files:scan --all

Forcer pour l'utilisateur "Cachem" uniquement :
php /volume1/web/nextcloud/occ files:scan Cachem

Si tu utilise par exemple php8, alors il faudra rempalcer php par php8, exemple :
php8 /volume1/web/nextcloud/occ files:scan --all

Tes dossiers devrons être correctement placer dans le dossier /data de l'utilisateurs en questions pour qu'ils soit indéxé. Je ne peut garantir le fonctionnement, car je n'ai pas de Synology.

Sinon, une autre solution c'est de monter tes dossiers en disque externe ( qui eux sont actualisé automatiquement par Nextcloud ) , mais je ne serai pas te guider pour une utilisation sur un synology avec ce type d'installation.
 
j'ai php8 installé, mais lorsque je lance :
php8 /volume1/web/nextcloud/occ files:scan --all
j'ai : -sh: php8: command not found
et si je lance : php /volume1/web/nextcloud/occ files:scan --all
j'ai : This version of Nextcloud requires at least PHP 7.4<br/>You are currently running 7.3.3. Please update your PHP version
??
 
Dans Web Station, quelle est la version par defaut de PHP pour votre serveur Web ?
aXVMsJn.png
 
PHP 8.0 est un paquet. A ce titre, il faut l’exécuter avec le chemin d'installation :
Code:
/volume1/@appstore/PHP8.0/usr/local/bin/php80
 
  • J'adore
Réactions: EVO
cela donne :

/volume1/@appstore/PHP8.0/usr/local/bin/php80 /volume1/web/nextcloud/occ files:scan --all
The current PHP memory limit is below the recommended value of 512MB.
{"reqId":"rgb0whVGWGQWwRoxFqR3","level":3,"time":"2022-06-15T07:45:27+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"fopen(/volume1/web/nextcloud/data/data_dir_writability_test_62a98e179fbab.tmp): Failed to open stream: Permission denied at /volume1/web/nextcloud/lib/private/legacy/OC_Util.php#580","userAgent":"--","version":"24.0.1.1","exception":{"Exception":"Error","Message":"fopen(/volume1/web/nextcloud/data/data_dir_writability_test_62a98e179fbab.tmp): Failed to open stream: Permission denied at /volume1/web/nextcloud/lib/private/legacy/OC_Util.php#580","Code":0,"Trace":[{"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::","args":[2,"fopen(/volume1/web/nextcloud/data/data_dir_writability_test_62a98e179fbab.tmp): Failed to open stream: Permission denied","/volume1/web/nextcloud/lib/private/legacy/OC_Util.php",580]},{"file":"/volume1/web/nextcloud/lib/private/legacy/OC_Util.php","line":580,"function":"fopen","args":["/volume1/web/nextcloud/data/data_dir_writability_test_62a98e179fbab.tmp","w"]},{"file":"/volume1/web/nextcloud/lib/private/Console/Application.php","line":157,"function":"checkServer","class":"OC_Util","type":"::","args":[{"__class__":"OC\\SystemConfig"}]},{"file":"/volume1/web/nextcloud/console.php","line":98,"function":"loadCommands","class":"OC\\Console\\Application","type":"->","args":[{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]},{"file":"/volume1/web/nextcloud/occ","line":11,"args":["/volume1/web/nextcloud/console.php"],"function":"require_once"}],"File":"/volume1/web/nextcloud/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"}}
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 web server write access to the root directory. See https://docs.nextcloud.com/server/24/go.php?to=admin-dir_permissions.

An unhandled exception has been thrown:
Exception: Environment not properly prepared. in /volume1/web/nextcloud/lib/private/Console/Application.php:164
Stack trace:
#0 /volume1/web/nextcloud/console.php(98): OC\Console\Application->loadCommands(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#1 /volume1/web/nextcloud/occ(11): require_once('/volume1/web/ne...')
#2 {main}{"reqId":"rgb0whVGWGQWwRoxFqR3","level":3,"time":"2022-06-15T07:45:27+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"fopen(/volume1/web/nextcloud/data/nextcloud.log): Failed to open stream: Permission denied at /volume1/web/nextcloud/lib/private/Log/File.php#84","userAgent":"--","version":"24.0.1.1"}
 
j'ai essayé avec sudo :

sudo /volume1/@appstore/PHP8.0/usr/local/bin/php80 /volume1/web/nextcloud/occ files:scan --all
Password:
Console has to be executed with the user that owns the file config/config.php
Current user id: 0
Owner id of config.php: 1026
Try adding 'sudo -u #1026' to the beginning of the command (without the single quotes)
If running with 'docker exec' try adding the option '-u 1026' to the docker command (without the single quotes)

en changeant de user :
sudo -u 1026 /volume1/@appstore/PHP8.0/usr/local/bin/php80 /volume1/web/nextcloud/occ files:scan --all
sudo: unknown user: 1026
sudo: error initializing audit plugin sudoers_audit

rien n'y fait...