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/
相关推荐
ltl11 小时前
内核追踪:ftrace、kprobe、uprobe、tracepoint 生产实战
linux
·薯条大王11 小时前
经济实惠玩云服务器|一台云服务器多人共用,子账号配置教程
java·linux·运维·服务器·汇编·c++·python
小小、码农14 小时前
Linux进程控制:从fork到exec,手写一个简易Shell
linux·运维·服务器
不会就选b14 小时前
Linux之进程间通信(二)---模拟进程池
linux·运维·服务器
沫璃染墨16 小时前
《从零入门Linux系统篇(十五):系统工具篇·六——GDB调试器详解:从程序执行控制到高级调试技巧》
linux·运维·服务器·c语言·c++
AIgorithmGEEK17 小时前
Linux 环境变量完全指南:从入门到理解底层原理
linux·运维·服务器
修罗王17 小时前
Linux Docker 服务管理与排查实战指南(新手速查版)
运维·docker
迪康Defender17 小时前
从静态存储到动态流转:终端透明加密两种模式实战解析
运维·服务器·网络·数据库·其他
酷可达拉斯18 小时前
Linux操作系统-升级OpenSSH修复漏洞
linux·运维·服务器·云计算
Molesidy18 小时前
【Linux】基于busybox的根文件系统的完善
linux·服务器·嵌入式linux