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/
相关推荐
帕里亚10 分钟前
ubuntu18.04 APT升级 glibc2.28 (Jetson)
linux·运维·windows
新新学长搞科研12 分钟前
【多所权威高校支持】第五届新能源系统与电力工程国际学术会议(NESP 2026)
运维·网络·人工智能·自动化·能源·信号处理·新能源
好运的阿财20 分钟前
“锟斤拷”问题——程序中用powershell执行命令出现中文乱码的解决办法
linux·前端·人工智能·机器学习·架构·编辑器·vim
cyber_两只龙宝21 分钟前
【Nginx】Nginx实现FastCGI详解
linux·运维·nginx·云原生·php·memcached·fastcgi
砖头拍死你22 分钟前
Powershell使用vim修改文件保存后文件名自动全变小写
linux·编辑器·vim
wang090729 分钟前
linux的中断分析(硬中断和软中断)
linux·运维·服务器
赵优秀一一41 分钟前
Python 工程化基础1:环境(conda)、pip、requirements.txt
linux·开发语言·python
阿沁QWQ41 分钟前
Docker 核心技术和实现原理
运维·docker·容器
风酥糖1 小时前
chroot的Linux服务配置-当云服务器真正用起来
linux·运维·服务器
木鱼布1 小时前
安装arm虚机启动失败
linux·运维·arm开发