ERPNEXT did not recognise the files in /private/files/ folder after restore

I restored an ERPnext VM from a backup.
I have only problems with the bublic/private files.

Assume I have a file:
/private/files/EDhaCe9.pdf

the file is in this directory:
/home/frappe/frappe-bench/sites/erpnext.vm/private/files/EDhaCe9.pdf

I restored all the private + public files, but
the ERPNEXT can’t reach it.

If I want to load the file from e-mail or from file-manager/handler
this comes out:
404 Not Found
nginx/1.4.6 (Ubuntu)

Tomorrow I will try this;

NO success.

Can someone help me out on this?

From the folder
/home/frappe/frappe-bench/sites/erpnext.vm/private/files/EDhaCe9.pdf
the file is reachable + can be copied to host file system and can be opened,
but the ERPnext system did not recognise it.
ERPnext open the file in a new windows showing:
404 Not Found
nginx/1.4.6 (Ubuntu)

@krnkris have you logged in? Private files are not accessible if you do not have the permissions

@rmehta
Thank you for your information!

I logged in as Administrator.
I tried to upload a logo in to the webpage
/private/files/logo_sz1.gif
it seem it uploads,
because it is as attachment,
but did not showing up on the webpage,
no access from attachments
only:
404 Not Found
nginx/1.4.6 (Ubuntu)

OK.
Made a new instance, same issue.

I checked the file permissions of the backed up and restored files.

Now i found the file permissions was on backed up files in the
/home/frappe/frappe-bench/sites/erpnext.vm/public/files/

-rwxrwx—
or
770

I changed the public back to:
-rw-r–r–
or
644

now the public files are OK.

Now I have to check the private files as well.

@rmehta

Sorry for your time…

in both cases
after restore all the files should be checked against file permissions.

Now everything works, great.

Thank you!

1 Like