Update problem: [Errno 13] Permission denied

Hello;

I did update from erpnext v8.5.2 to v9.2.2, but I got the below Errno 13 and when I do upgrade, I get the same errors. But the system is working fine and no problem.

Actually the error is related to file of extension .pyc and when I try to access the directory to reach this file, I do not find the .pyc file but I find the file with extension .py, so what is the reason and is it really a serious problem? Actually the error messages are bothering specially that it appears every time I do migrate as seen below.

Also, I repeated the update from v.8.5.2 and the same problem and I did also update from the updated version which is v9.2.2 but the error also appears.

bghayad@Bilal:/home/frappe/frappe-bench$ sudo bench migrate
Migrating site1.local
Updating DocTypes for frappe : [========================================]
Updating DocTypes for erpnext : [========================================]
Updating DocTypes for taxi : [========================================]

Sorry [Errno 13] Permission denied: ‘…/apps/frappe/frappe/printing/doctype/print_style/test_print_style.pyc.140341857048544’
Sorry [Errno 13] Permission denied: ‘…/apps/frappe/frappe/printing/print_style/init.pyc.140341857116544’
Sorry [Errno 13] Permission denied: ‘…/apps/frappe/frappe/printing/print_style/classic/init.pyc.140341857088592’
Sorry [Errno 13] Permission denied: ‘…/apps/frappe/frappe/printing/print_style/modern/init.pyc.140341857088592’
Sorry [Errno 13] Permission denied: ‘…/apps/frappe/frappe/printing/print_style/monochrome/init.pyc.140341857088592’


Appreciate the kindly help.
Regards
Bilal

Your problem might be this?
ERPNext v9 bench migrate "Sorry [Errno 13] Permission denied"

1 Like

Exactly.
It is resolved by:

sudo chown -R frappe:frappe *

Regards
Bilal

1 Like

Never run bench commands with sudo

go sudo su frappe
then run bench commands, so you run them as the frappe user.

That prevents a lot of issues.

1 Like

Maybe that caused the problem from the beginning?

Regards
Bilal