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/
相关推荐
Lacrimosa&L11 分钟前
操作系统概述
运维
Guheyunyi23 分钟前
风险感知中枢:监测预警系统的架构与核心
大数据·运维·安全·重构·架构·自动化
东城绝神33 分钟前
《Linux运维总结:基于X86_64+ARM64架构CPU使用docker-compose一键离线部署consul 1.21.5容器版集群》
linux·运维·docker·架构·consul
ajassi200033 分钟前
开源 Linux 服务器与中间件(三)服务器--Nginx
linux·服务器·开源
wheeldown39 分钟前
【Linux】Linux进程间通信:命名管道(FIFO)的模拟实现重要知识点梳理
linux·运维·服务器
Crazy________43 分钟前
34部署LNMP架构详细解析
linux·运维·服务器·nginx
tan180°1 小时前
Linux网络HTTP(上)(7)
linux·网络·http
小醉你真好1 小时前
17、Centos9 安装 1Panel
linux·docker·运维开发
九皇叔叔1 小时前
Linux Shell 正则表达式:从入门到实战,玩转文本匹配与处理
linux·mysql·正则表达式
lhxcc_fly2 小时前
Linux网络--6、网络层
linux·网络·ip