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/
相关推荐
蜀道山老天师几秒前
Prometheus监控Hadoop集群(实操完整版,含避坑指南)
大数据·linux·运维·hadoop·云原生·prometheus
biubiubiu07065 分钟前
Ubuntu命令练习
linux·运维·ubuntu
sbjdhjd8 分钟前
01| 裸机部署 K8S:从零搭建生产可用集群
运维·经验分享·云原生·kubernetes·开源·kubelet·kubeless
曦夜日长9 分钟前
Linux系统篇,开发工具(二):vim的使用与配置
linux·服务器·vim·excel
jran-15 分钟前
Docker 容器化技术&docker安装
运维·docker·容器
呉師傅15 分钟前
将CD音频抓轨转换成MP3的两种方法【图文解释】
运维·服务器·网络·windows·电脑·音视频
iceman195215 分钟前
ubuntu 25.10升级到26.04
linux·服务器·ubuntu
拾光Ծ15 分钟前
【Linux系统】线程(上)
java·linux·运维·jvm·线程·c/c++
轩轩的学习之路20 分钟前
claudecode安装+第三方模型,无root
linux·人工智能·python
金玉满堂@bj20 分钟前
pytest+uiautomation+allure 数据驱动桌面自动化项目搭建指南-yaml版本
运维·自动化·pytest