salt: non-root users cannot use salt after upgrade to 3006.3
Description After upgrading from 3005 (py3) to 3006 (onedir), non-root users can no longer use the salt command:
$ salt \* test.ping
[WARNING ] Failed to open log file, do you have permission to write to /var/log/salt/master?
[ERROR ] Unable to connect to the salt master publisher at /var/run/salt/master
The salt master could not be contacted. Is master running?
Setup (Please provide relevant configs and/or SLS files (be sure to remove sensitive info. There is no general set-up of Salt.)
Please be as specific as possible and give set-up details.
- on-prem machine
- onedir packaging
Salt-Master running 3006.3 onedir.
Several non-root users have limited permissions on Salt using publisher_acl.
Steps to Reproduce the behavior
run salt command on the master as a non-root user, to receive the above-mentioned error message.
Indeed, the directory /var/run/salt/master has no permissions for other users:
drwxr-x--- 2 root root 120 Sep 28 11:27 .
drwxr-xr-x 4 root root 80 Sep 6 19:32 ..
srw-rw---- 1 root root 0 Sep 28 11:27 master_event_pub.ipc
srw------- 1 root root 0 Sep 28 11:27 master_event_pull.ipc
srw------- 1 root root 0 Sep 28 11:27 publish_pull.ipc
srw------- 1 root root 0 Sep 28 11:27 workers.ipc
After allowing all users read/write access to the directory and all files (which stronly feels wrong), the non-root user gets this error:
$ salt \* test.ping
[WARNING ] Failed to open log file, do you have permission to write to /var/log/salt/master?
Authentication error occurred.
Expected behavior
Running salt commands as non-root user with permissions in publisher_acl should run like before the upgrade.
Versions Report
salt --versions-report
Salt Version:
Salt: 3006.3
Python Version:
Python: 3.10.13 (main, Sep 6 2023, 02:11:27) [GCC 11.2.0]
Dependency Versions:
cffi: 1.14.6
cherrypy: unknown
dateutil: 2.8.1
docker-py: Not Installed
gitdb: Not Installed
gitpython: Not Installed
Jinja2: 3.1.2
libgit2: 1.3.0
looseversion: 1.0.2
M2Crypto: Not Installed
Mako: Not Installed
msgpack: 1.0.2
msgpack-pure: Not Installed
mysql-python: Not Installed
packaging: 22.0
pycparser: 2.21
pycrypto: Not Installed
pycryptodome: 3.9.8
pygit2: 1.7.0
python-gnupg: 0.4.8
PyYAML: 6.0.1
PyZMQ: 23.2.0
relenv: 0.13.10
smmap: Not Installed
timelib: 0.2.4
Tornado: 4.5.3
ZMQ: 4.3.4
System Versions:
dist: centos 7.9.2009 Core
locale: utf-8
machine: x86_64
release: 3.10.0-1160.90.1.el7.x86_64
system: Linux
version: CentOS Linux 7.9.2009 Core
About this issue
- Original URL
- State: open
- Created 3 years ago
- Comments: 18 (7 by maintainers)
Ideally
chmodshould not be used at all. Instead theumaskwhen creating it should be configurable.That’s the wrong link and I’m not sure why it works. These are the actual release notes: https://docs.saltproject.io/en/latest/topics/releases/3006.0.html