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/
相关推荐
暴力求解7 分钟前
Linux---进程(五)进程调度
linux·运维·服务器
楼田莉子8 分钟前
C++项目:日志&&线程池
linux·c++·学习·visual studio code
wsad053220 分钟前
Linux 用户和组管理完整指南(中英文参数对照)
linux·运维·服务器
S-码农1 小时前
Linux进程通讯——共享内存
linux
EmbedLinX1 小时前
嵌入式Linux之U-Boot
linux·服务器·笔记·学习
程序设计实验室1 小时前
从挖矿木马入侵到 Docker Rootless 加固,我的服务器安全复盘
linux·docker
雷电法拉珑1 小时前
财务数据批量采集
linux·前端·python
fjh19972 小时前
使用caddy签发ip证书
运维·服务器
Roc.Chang3 小时前
Vite 启动报错:listen EACCES: permission denied 0.0.0.0:80 解决方案
linux·前端·vue·vite
暴力求解3 小时前
Linux进程(六)命令行参数
linux·运维·服务器