Bench Update Error - Production V12.9.4

Just updated to v12.9.4 - getting the following error at the very end of bench update:

Done in 78.76s.
$ supervisorctl restart frappe:
error: <class 'PermissionError'>, [Errno 13] Permission denied: file: /usr/local/lib/python3.6/dist-packages/supervisor/xmlrpc.py line: 560

Have not changed anything in production environment - first time encountering any error. Remember reading something recently about change for sudo commands needing password… is this related? Sites seem to be up and running… did a manual supervisor restart all command.

Any thoughts?

1 Like

Resolved this by changing permissions for user frappe on supervisord.

In the /etc/supervisor/supervisord.conf under add line chown… as shown below

[unix_http_server]
file=/var/tmp/supervisord.sock
chmod=0700
chown=frappe:frappe
8 Likes

I had the same error when doing bench restart and resolve with the same by changing chmod and chown.

But is this the correct way to resolve? Because the chmod and chown is set by bench when we do `bench setup supervisor’.
And why it causes this error then?

I use CentOS 8 and did sudo when pip3 install frappe-bench (I suspect this cause this?)

chown=frappe:frappe
i have same issue
what u meen with first " frappe" and second one “frappe”
thanks :slight_smile:

@Mohamed-3tef

chown means “change owner”.
chgrp means “change group”.

In Unix there are two classes of ownership: user and group.

Every user has their own group of the same name, so a file’s listing shows like this.

-rw-r--r-- 1 admin admin    0 Aug  8 21:51 scrap.txt

You can call …

sudo chown you scrap.txt

… to change the owner, but not the group …

-rw-r--r-- 1 you   admin    0 Aug  8 21:51 scrap.txt

You can call chgrp

sudo chgrp you scrap.txt

… to change the group, but not the owner …

-rw-r--r-- 1 you   you    0 Aug  8 21:51 scrap.txt

Finally you can call …

sudo chown admin:admin scrap.txt

… to change both the owner and the group …

-rw-r--r-- 1 admin admin    0 Aug  8 21:51 scrap.txt

Lifesaver !! :100:

A couple of notes however:

  1. this only works if you do actually call your bench running user frappe. In my case …

    admin@erpls:~/frappe-bench-ERPLS$ ll
    total 40
    drwxr-xr-x 7 admin admin 4096 Aug  8 23:07 ./
    drwxr-x--- 8 admin admin 4096 Aug  8 23:07 ../
    drwxr-xr-x 4 admin admin 4096 Aug  8 23:07 apps/
    drwxr-xr-x 3 admin admin 4096 Aug  8 23:39 config/
    drwxr-xr-x 6 admin admin 4096 Aug  8 23:05 env/
    drwxr-xr-x 2 admin admin 4096 Aug  8 23:42 logs/
    -rw-r--r-- 1 admin admin  347 Aug  8 23:30 patches.txt
    -rw-r--r-- 1 admin admin  546 Aug  8 23:03 Procfile
    drwxr-xr-x 4 admin admin 4096 Aug  8 23:33 sites/
    -rwxr-xr-x 1 admin admin 1793 Aug  8 23:07 stop.py*
    admin@erpls:~/frappe-bench-ERPLS$ 
    

    … I had to use

    chown=admin:admin
    
  2. supervisor won’t notice the change until you execute:

    sudo -A systemctl restart supervisor
    
3 Likes