Solution to: error: <class 'PermissionError'>, [Errno 13] Permission denied

I’m working on erpnext v14 - productions, everything is supposed to be set up correctly…
However, I have the same problem that keeps appearing, when I execute bench commands… such as: “update, migrate, …”

This error appears as follows:

error: <class ‘PermissionError’>, [Errno 13] Permission denied: file: /usr/lib/python3/dist-packages/supervisor/xmlrpc.py line: 560

Is there anyone here who can help me?
What am I missing here? Please Help…

You can follow Step 19 from this tutorial “How to install ERPNext”.

1 Like

Greetings Sir, please can you help with this error message when trying to run erpnext 14

Traceback (most recent call last):
File “/usr/local/bin/bench”, line 8, in
sys.exit(cli())
File “/usr/local/lib/python3.8/dist-packages/bench/cli.py”, line 71, in cli
cmd_from_sys = get_cmd_from_sysargv()
File “/usr/local/lib/python3.8/dist-packages/bench/utils/init.py”, line 55 4, in get_cmd_from_sysargv
if sys_argv.index(arg) == 0 and arg in Bench(“.”).apps:
File “/usr/local/lib/python3.8/dist-packages/bench/bench.py”, line 67, in in it
self.apps = BenchApps(self)
File “/usr/local/lib/python3.8/dist-packages/bench/bench.py”, line 174, in i nit
self.initialize_apps()
File “/usr/local/lib/python3.8/dist-packages/bench/bench.py”, line 278, in ini tialize_apps
for x in os.listdir(os.path.join(self.bench.name, “apps”))
PermissionError: [Errno 13] Permission denied: ‘./apps’

i was following Synbricks Tutorials @

Change the permissions of the user’s directory with the following command:
chmod -R o+rx /home/[frappe-user]/

1 Like

I already did that, but I’m still facing the same problem…
I think I did something wrong

error: <class ‘PermissionError’>, [Errno 13] Permission denied: file: /usr/lib/python3/dist-packages/supervisor/xmlrpc.py line: 560

This error occurs when you try to access a file that you don’t have permissions to access in Python,

The solution is to grant yourself (User) access to the file using the chown or chmod command.

please, following This command:
chmod -R o+rx /home/[frappe-user]/
  • after that,
sudo nano /etc/supervisor/supervisord.conf
  • and add these lines under [unix_http_server]
chmod=0760
chown=frappe:frappe
  • you might also need to restart supervisor
sudo -A systemctl restart supervisor
3 Likes