linagora / linshare

LinShare
https://www.linshare.org/
GNU Affero General Public License v3.0
476 stars 86 forks source link

Problème d'enregistrement des fichiers en mode filesystem #256

Closed xlyric closed 1 year ago

xlyric commented 1 year ago

L"appli refuse d'enregistrer les fichier télécharger sur le disque ( une erreur est survenue lors de l'envoie du fichier ) en mode filesystem ( le mode mongo ou swift fonctionne ) le répertoire /var/lib/linshare/filesystemstorage est existant et droit tomcat:tomcat , le filesystem ne se crée pas

CORE 5.1.2 Tomcat 9

openjdk version "11.0.16" 2022-07-19
OpenJDK Runtime Environment (build 11.0.16+8-post-Debian-1deb11u1)
OpenJDK 64-Bit Server VM (build 11.0.16+8-post-Debian-1deb11u1, mixed mode)
           JAVA_OPTS="${JAVA_OPTS} -Djava.awt.headless=true -Xms512m
-Xmx2048m"
           JAVA_OPTS="${JAVA_OPTS}
-Dlinshare.config.path=file:/etc/linshare/"
           JAVA_OPTS="${JAVA_OPTS}
-Dlog4j2.configurationFile=file:/etc/linshare/log4j2.properties"
           JAVA_OPTS="${JAVA_OPTS}
-Dspring.profiles.active=default,jcloud,batches"
linshare.documents.storage.mode=filesystem
linshare.documents.storage.bucket=linshare-data
linshare.encipherment.tmp.dir=/var/lib/linshare/tmp
linshare.documents.storage.filesystem.directory=/var/lib/linshare/filesystemstorage

Logs :

`2022-12-02 14:02:05

processing async task : c2b3cc59-b87a-4e8c-9634-967786b1ffd4 2022-12-02 14:02:05

processing async task : c2b3cc59-b87a-4e8c-9634-967786b1ffd4 2022-12-02 14:02:05

file using jcloud ... 2022-12-02 14:02:05

file using jcloud ... 2022-12-02 14:02:05

of a new bucket linshare-data without locale. 2022-12-02 14:02:05

of a new bucket linshare-data without locale. 2022-12-02 14:02:05

not found: container linshare-data not in [] 2022-12-02 14:02:05

not found: container linshare-data not in [] 2022-12-02 14:02:05

task 'c2b3cc59-b87a-4e8c-9634-967786b1ffd4' processed with final status : FAILED 2022-12-02 14:02:05

task 'c2b3cc59-b87a-4e8c-9634-967786b1ffd4' processed with final status : FAILED`

Max59C commented 1 year ago

Bonjour xlyric, as-tu paramétrer le service tomcat pour qu'il ait les droits? Cf doc :

Tomcat9 is sandboxed to write just in its own directories, if you try to use a local Filesystem storage you need to override the default configuration of Tomcat by creating in /etc/systemd/system/tomcat9.service.d/ a file named override.conf containing: [Service] ReadWritePaths=/var/lib/linshare

Then you need to: systemctl daemon-reload systemctl restart tomcat9

xlyric commented 1 year ago

effectivement ça fonctionne mieux, merci.

ça manque juste un peu de visibilité dans la doc.