[GH-ISSUE #36] Attachments won't open #21

Closed
opened 2026-02-25 23:39:37 +03:00 by kerem · 5 comments
Owner

Originally created by @t10ss on GitHub (Jan 20, 2022).
Original GitHub issue: https://github.com/HaschekSolutions/opentrashmail/issues/36

When I try to open any attachment I get this message: {"status":"err","reason":"File not found"} in the browser.
The file is stored in the file system in the attachments directory
Any idea how to fix?

Thanks

Originally created by @t10ss on GitHub (Jan 20, 2022). Original GitHub issue: https://github.com/HaschekSolutions/opentrashmail/issues/36 When I try to open any attachment I get this message: {"status":"err","reason":"File not found"} in the browser. The file is stored in the file system in the attachments directory Any idea how to fix? Thanks
kerem closed this issue 2026-02-25 23:39:37 +03:00
Author
Owner

@geek-at commented on GitHub (Jan 21, 2022):

sounds like both your problems #36 and #37 are issues with permissions. Can you try giving your monted folders 777 rights and see if it works then.

But yeah ultimately I'll have to edit the docker flow to add a special user so not everything runs as root

<!-- gh-comment-id:1018263702 --> @geek-at commented on GitHub (Jan 21, 2022): sounds like both your problems #36 and #37 are issues with permissions. Can you try giving your monted folders 777 rights and see if it works then. But yeah ultimately I'll have to edit the docker flow to add a special user so not everything runs as root
Author
Owner

@t10ss commented on GitHub (Jan 21, 2022):

It fixed the deleting of files, but didn't fix attachment viewing.
Still get the same result {"status":"err","reason":"File not found"} . I'm not finding anything in the logs about it. Maybe there is a better place I should look.

<!-- gh-comment-id:1018670666 --> @t10ss commented on GitHub (Jan 21, 2022): It fixed the deleting of files, but didn't fix attachment viewing. Still get the same result {"status":"err","reason":"File not found"} . I'm not finding anything in the logs about it. Maybe there is a better place I should look.
Author
Owner

@geek-at commented on GitHub (Jan 22, 2022):

Can you confirm that the attachment is actually in the storage?

If it's not try sending another mail with an attachment now that you set the permissions of the folder to 777

<!-- gh-comment-id:1019376694 --> @geek-at commented on GitHub (Jan 22, 2022): Can you confirm that the attachment is actually in the storage? If it's not try sending another mail with an attachment now that you set the permissions of the folder to 777
Author
Owner

@t10ss commented on GitHub (Jan 23, 2022):

File is in storage. I tried sending another attachment here is the listing of the directory. The PDF file was in the directory before the chmod to 777, so it has 777 permissions.
The PNG file was received after I set the permissions of /var/www/opentrashmail/data to 777
/var/www/opentrashmail/data/test@mailsnap.com/attachments # ls -l
total 36
-rwxrwxrwx 1 root root 29909 Jan 21 22:28 1642804128295-Protein.pdf
-rw-r--r-- 1 root root 2281 Jan 23 03:43 1642909406496-woxen-icon.png

<!-- gh-comment-id:1019408810 --> @t10ss commented on GitHub (Jan 23, 2022): File is in storage. I tried sending another attachment here is the listing of the directory. The PDF file was in the directory before the chmod to 777, so it has 777 permissions. The PNG file was received after I set the permissions of /var/www/opentrashmail/data to 777 /var/www/opentrashmail/data/test@mailsnap.com/attachments # ls -l total 36 -rwxrwxrwx 1 root root 29909 Jan 21 22:28 1642804128295-Protein.pdf -rw-r--r-- 1 root root 2281 Jan 23 03:43 1642909406496-woxen-icon.png
Author
Owner

@geek-at commented on GitHub (Jan 23, 2022):

there was a bug in the code. your attachments should work now after updating to the latest version

<!-- gh-comment-id:1019582933 --> @geek-at commented on GitHub (Jan 23, 2022): there was a bug in the code. your attachments should work now after updating to the latest version
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/opentrashmail#21
No description provided.