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/
相关推荐
zl97989937 分钟前
RabbitMQ-下载安装与Web页面
linux·分布式·rabbitmq
小小测试开发1 小时前
JMeter JSR223预处理程序全攻略:用Groovy解锁复杂场景自动化
运维·jmeter·自动化
kitty_hi2 小时前
mysql主从配置升级,从mysql5.7升级到mysql8.4
linux·数据库·mysql·adb
甄心爱学习3 小时前
计算机网络12
运维·服务器·网络
moringlightyn3 小时前
Linux---进程状态
linux·运维·服务器·笔记·操作系统·c·进程状态
go_bai3 小时前
Linux-线程2
linux·c++·经验分享·笔记·学习方法
shizhan_cloud4 小时前
DNS 服务器
linux·运维
优质&青年4 小时前
【Operator pormetheus监控系列四----.alertmanager和Rules服务配置】
运维·云原生·kubernetes·prometheus
q***13344 小时前
Linux系统离线部署MySQL详细教程(带每步骤图文教程)
linux·mysql·adb
小雪_Snow5 小时前
Ubuntu 安装教程
linux·ubuntu