Uploaded file size is 0 bytes when downloaded


when I attach a file to a doctype, it seems to be correct (can see at left panel), but when I try to visualizate or download by clicking it, the file is invalid or it download with 0bytes size.

First, my steps to configure private folder permissions:

***@bitnami-erpnext-dm-0201:~/apps/erpnext/htdocs/frappe-bench/sites/erpnext/private$ sudo su
root@bitnami-erpnext-dm-0201:/opt/bitnami/apps/erpnext/htdocs/frappe-bench/sites/erpnext/private# chmod -R 775 files/

I upload a file: myfile.pdf (388KB), but afterward I can’t download correctly or view at browser

This is the permission view of the file:

myuser@bitnami-erpnext-dm-0201:~/apps/erpnext/htdocs/frappe-bench/sites/erpnext/private/files$ ls -l -ls
388 -rw-r--r-- 1 daemon daemon 397217 Aug 11 07:56 myfile.pdf

Please, any suggestions?

Thanks in advance.

Private files are not served based on OS permissions, it is served by the webserver based on the user’s permission

ok, thank you,

I have full permissions, but when I download them are a 0bytes files.