[Errno 13] Permission denied: '/opt/bitnami/apps/erpnext/htdocs/frappe-bench/logs/bench.log'

This error appears when I write bench - version. this writes : [Errno 13] Permission denied: ‘/opt/bitnami/apps/erpnext/htdocs/frappe-bench/logs/bench.log’

can you help ?

If it’s a permission error then try using CHOWN or CHMOD.

example for CHMOD:(Take note that chmod 777 is not the best practice)
sudo chmod 777 /opt/bitnami/apps/erpnext/htdocs/frappe-bench/logs/bench.log

1 Like

But how is this a complete solution? I mean after every x time or, y event the bench.log or database.log or frappe.log file will be zipped and new will be created then this probelm will occur again.

Also if multi-tenant is enabled, the database.log.20 is also made and its the active one that is used, then we agian need to make permissions. The solution should be to set services in a mode that they can access log files without us setting the permissions or ownership!

2 Likes