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/
相关推荐
pengyi87101516 小时前
共享IP全面优缺点解析,适合什么人群使用?
linux·运维·服务器·网络·tcp/ip
wo32586614517 小时前
国产信创海光服务、兆芯服务器,搭配板载国产千兆网卡网讯WX1860A2、WX1860A4网卡驱动安装方法
运维·服务器
IpdataCloud17 小时前
IPv6时代,IP归属地查询服务精准度面临哪些挑战?实测对比+提升方案
运维·服务器·网络
Little At Air17 小时前
LinuxOS阻塞队列模型(单生产者单消费者)
linux·数据结构·c++
南境十里·墨染春水17 小时前
linux学习进展 git详解
linux·git·学习
念恒1230617 小时前
基础IO(一切皆文件)
linux·c语言·c++·算法
上海云盾-小余17 小时前
服务器异常流量排查:攻击识别与快速限流处置指南
运维·服务器·网络
Irissgwe18 小时前
四、进程控制(进程创建与终止)
linux·c++·进程·系统编程·fork·进程创建·进程终止
宵时待雨18 小时前
linux笔记归纳5:进程控制
linux·运维·笔记
志栋智能18 小时前
超自动化巡检:实现精细化运维管理的基础
运维·服务器·网络·人工智能·自动化