You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I run a simple state to create a symlink with file.symlink, salt tries to set ownership to root:root whereas I'm not running salt as root (masterless setup).
$ python2.7 .tmp/thin/salt-call -c /home/bruno/dev/setupify --state-output=changes state.sls test
[WARNING ] Although 'dmidecode' was found in path, the current user cannot execute it. Grains output might not be accurate.
[ERROR ] {'new': '/home/bruno/dev/setupify/symlink'}
local:
----------
ID: symling_test
Function: file.symlink
Name: /home/bruno/dev/setupify/symlink
Result: False
Comment: Created new symlink /home/bruno/dev/setupify/symlink -> /home/bruno/dev/setupify/, but was unable to set ownership to root:root
Started: 16:30:46.619745
Duration: 10.644 ms
Changes:
----------
new:
/home/bruno/dev/setupify/symlink
Summary for local
------------
Succeeded: 0 (changed=1)
Failed: 1
------------
Total states run: 1
Total run time: 10.644 ms
Versions Report
(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)
$ python2.7 .tmp/thin/salt-call -c /home/bruno/dev/setupify --versions-report
Salt Version:
Salt: 2016.11.0-11-g47d21d9
Dependency Versions:
cffi: 0.8.6
cherrypy: 2.3.0
dateutil: 2.6.0
gitdb: Not Installed
gitpython: Not Installed
ioflo: Not Installed
Jinja2: 2.8
libgit2: Not Installed
libnacl: Not Installed
M2Crypto: Not Installed
Mako: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.4.8
mysql-python: 1.2.3
pycparser: 2.10
pycrypto: 2.6.1
pygit2: Not Installed
Python: 2.7.9 (default, Jun 29 2016, 13:08:31)
python-gnupg: Not Installed
PyYAML: 3.12
PyZMQ: Not Installed
RAET: Not Installed
smmap: Not Installed
timelib: Not Installed
Tornado: 4.4.2
ZMQ: Not Installed
System Versions:
dist: debian 8.6
machine: x86_64
release: 4.3.0-0.bpo.1-amd64
system: Linux
version: debian 8.6
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.
Description of Issue/Question
When I run a simple state to create a symlink with file.symlink, salt tries to set ownership to root:root whereas I'm not running salt as root (masterless setup).
After investigating, it seems that
__opts__['user']
is set to root while it should be set tobruno
which is the user that runs the salt command.See https://github.com/saltstack/salt/blob/2016.11/salt/states/file.py#L863-L864
Setup
(Please provide relevant configs and/or SLS files (Be sure to remove sensitive info).)
Steps to Reproduce Issue
(Include debug logs if possible and relevant.)
Versions Report
(Provided by running
salt --versions-report
. Please also mention any differences in master/minion versions.)The text was updated successfully, but these errors were encountered: