centos 普通用户操作 supervisor 报错

error: <class 'socket.error'>, [Errno 13] Permission denied: file: /usr/lib64/python2.7/socket.py line: 224

1. 修改supervisor配置文件

修改supervisor属主属组及文件权限

修改配置文件

c 复制代码
# vim /etc/supervisord.conf
4 file=/var/run/supervisor/supervisor.sock   ; (the path to the socket file)
5 chmod=0766                 ; sockef file mode (default 0700)
6 chown=dev_read:dev_read       ; socket file uid:gid owner

重启服务生效配置

c 复制代码
systemctl restart supervisord.service

2. 修改sock文件所在目录的权限

对于没有root权限仍然无法使用supervisorctl的人,你可以检查sock文件所在目录的权限:

c 复制代码
ls -ld /var/run/supervisor/

如果你不能访问这个目录,你应该使用chown或chmod如下:

c 复制代码
chown user:group /var/run/supervisor/

或者

c 复制代码
chmod 777 /var/run/supervisor/
相关推荐
S***26757 小时前
linux上redis升级
linux·运维·redis
赖small强7 小时前
【Linux 网络基础】Linux 平台 DHCP 运作原理与握手过程详解
linux·网络·dhcp
ifanatic8 小时前
[每周一更]-(第161期):分析服务器中内存即将爆满过程
运维·服务器
热爱学习的小怪兽8 小时前
docker的一些常用指令
运维·docker·容器
s***4539 小时前
Linux 下安装 Golang环境
linux·运维·golang
JobDocLS9 小时前
Ubuntu22.04的安装方法
运维
豆豆的java之旅10 小时前
深入浅出Activity工作流:从理论到实践,让业务流转自动化
java·运维·自动化·activity·工作流
J***516810 小时前
Linux安装Redis以及Redis三种启动方式
linux·redis·bootstrap
4***175410 小时前
Linux 下安装 Golang环境
linux·运维·golang
Lenyiin10 小时前
《 Linux 修炼全景指南: 七 》 指尖下的利刃:深入理解 Vim 的高效世界
linux·运维·服务器·vim·lenyiin