Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Incorrect permissions on file when using symbolic link #66400

Closed
dwoz opened this issue Apr 18, 2024 · 1 comment
Closed

[BUG] Incorrect permissions on file when using symbolic link #66400

dwoz opened this issue Apr 18, 2024 · 1 comment
Assignees
Labels
Bug broken, incorrect, or confusing behavior

Comments

@dwoz
Copy link
Contributor

dwoz commented Apr 18, 2024

Description

salt can change a file’s permissions to 777 when it attempts to change ownership of symbolic links that point to that file.

Setup

[root@d435dc990f97 /]# salt-minion -V
Salt Version:
          Salt: 3006.7
 
Python Version:
        Python: 3.10.13 (main, Feb 19 2024, 03:31:20) [GCC 11.2.0]
 
Dependency Versions:
          cffi: 1.14.6
      cherrypy: 18.6.1
      dateutil: 2.8.1
     docker-py: Not Installed
         gitdb: Not Installed
     gitpython: Not Installed
        Jinja2: 3.1.3
       libgit2: Not Installed
  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.19.1
        pygit2: Not Installed
  python-gnupg: 0.4.8
        PyYAML: 6.0.1
         PyZMQ: 23.2.0
        relenv: 0.15.1
         smmap: Not Installed
       timelib: 0.2.4
       Tornado: 4.5.3
           ZMQ: 4.3.4
 
System Versions:
          dist: rocky 8.8 Green Obsidian
        locale: utf-8
       machine: x86_64
       release: 4.18.0-477.27.1.el8_8.x86_64
        system: Linux
       version: Rocky Linux 8.8 Green Obsidian
 
[root@d435dc990f97 /]# cat /srv/salt/test.sls 
/test-dir:
  file.directory:
    - user: root
    - recurse:
      - user
[root@d435dc990f97 /]# ls -l /test-dir
total 4
lrwxrwxrwx 1 nobody root 6 Mar 25 09:03 link -> target
-rw-r--r-- 1 root   root 2 Mar 25 09:03 target
[root@d435dc990f97 /]# salt-call --local state.sls test
local:
----------
          ID: /test-dir
    Function: file.directory
      Result: True
     Comment: Directory /test-dir updated
     Started: 09:04:46.630809
    Duration: 7.34 ms
     Changes:   
              ----------
              /test-dir/link:
                  ----------
                  user:
                      root
              user:
                  root

Summary for local
------------
Succeeded: 1 (changed=1)
Failed:    0
------------
Total states run:     1
Total run time:   7.340 ms
[root@d435dc990f97 /]# ls -l /test-dir
total 4
lrwxrwxrwx 1 root root 6 Mar 25 09:03 link -> target
-rwxrwxrwx 1 root root 2 Mar 25 09:03 target
@dwoz dwoz added Bug broken, incorrect, or confusing behavior needs-triage and removed needs-triage labels Apr 18, 2024
@dwoz dwoz added this to the Sulfur v3006.8 milestone Apr 18, 2024
@dwoz dwoz self-assigned this Apr 18, 2024
@dwoz
Copy link
Contributor Author

dwoz commented May 1, 2024

Fixed in 3006.8

@dwoz dwoz closed this as completed May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior
Projects
None yet
Development

No branches or pull requests

1 participant