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/
相关推荐
Fleshy数模1 小时前
MySQL 表创建全攻略:Navicat 图形化与 Xshell 命令行双模式实践
linux·mysql
神梦流2 小时前
GE 引擎的非标准数据流处理:稀疏张量与自定义算子在图优化中的语义保持
linux·运维·服务器
兜兜转转了多少年2 小时前
从脚本到系统:2026 年 AI 代理驱动的 Shell 自动化
运维·人工智能·自动化
.小墨迹3 小时前
apollo学习之借道超车的速度规划
linux·c++·学习·算法·ubuntu
Lsir10110_3 小时前
【Linux】中断 —— 操作系统的运行基石
linux·运维·嵌入式硬件
Sheffield3 小时前
command和shell模块到底区别在哪?
linux·云计算·ansible
历程里程碑3 小时前
Linux20 : IO
linux·c语言·开发语言·数据结构·c++·算法
郝学胜-神的一滴3 小时前
深入浅出:使用Linux系统函数构建高性能TCP服务器
linux·服务器·开发语言·网络·c++·tcp/ip·程序人生
承渊政道3 小时前
Linux系统学习【Linux系统的进度条实现、版本控制器git和调试器gdb介绍】
linux·开发语言·笔记·git·学习·gitee
技术路上的探险家3 小时前
Ubuntu下Docker与NVIDIA Container Toolkit完整安装教程(含国内源适配)
linux·ubuntu·docker