freescout-help-desk / freescout

FreeScout — Free self-hosted help desk & shared mailbox (Zendesk / Help Scout alternative)
https://freescout.net
GNU Affero General Public License v3.0
2.94k stars 484 forks source link

Attachment uploading: error occured #4062

Closed dewced closed 3 months ago

dewced commented 3 months ago

PHP version: 8.2 FreeScout version: 1.8.141
Database: MySQL Are you using CloudFlare: Yes Are you using non-official modules: No

Hi! When uploading attachments in a conversation, I get "Error occurred. Please try again later.". In app logs I see: [Attachment::saveFileToDisk()] Error: Impossible to create the root directory "/var/www/clients/client5/web14/web/storage/app/attachment/1/9/1". ; File: /var/www/clients/client5/web14/web/vendor/league/flysystem/src/Adapter/Local.php (112)

File not found at path: attachment/1/9/1/file_1.jpg {"userId":1,"email":"xxx","exception":"[object] (League\Flysystem\FileNotFoundException(code: 0): File not found at path: attachment/1/9/1/file_1.jpg at /var/www/clients/client5/web14/web/vendor/league/flysystem/src/Filesystem.php:390)

For permissions, only this is still flagged: storage/framework/cache/data/ => Non-writable files found /var/www/clients/client5/web14/web/storage/framework/cache/data/8b/15/8b159073fff3ffaf20fe01c1bbaaf6e435612c4e

Run the following command (read more): sudo chown -R www-data:www-data /var/www/clients/client5/web14/web


However, if I run that command, the webserver is not working as other user needs the rights on this folder. (ISPCONFIG). Any idea what is wrong? Thanks!

tuton012 commented 3 months ago

I have the same issue and still I can't resolve it. on my end when I run the command:

sudo chown -R www-data:www-data /var/www/html

the server goes to white screen and stops working I have to restore from backup.

freescout-helpdesk commented 3 months ago

https://github.com/freescout-helpdesk/freescout/wiki/Installation-Guide#-permissions-issue