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

file.directory recurse not always changing perms #49393

Open
Poil opened this issue Aug 29, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@Poil
Copy link

commented Aug 29, 2018

Description of Issue/Question

Setup

flxccs_fix_apache_errorpages:
  file.directory:
    - name: /data/apache/errorPages
    - user: root
    - group: root
    - file_mode: "0644"
    - dir_mode: "0755"
    - recurse:
      - user
      - group
      - mode

Steps to Reproduce Issue

  • Initial permissions
[root@flxccs-d03-tst errorPages]# ll
total 204
-rw------- 1 root root  4539 Aug 27 10:39 contact.html.var
-rw------- 1 root root  9941 Aug 27 10:39 HTTP_BAD_GATEWAY.html.var
-rw------- 1 root root  7112 Aug 27 10:39 HTTP_BAD_REQUEST.html.var
-rw------- 1 root root 12578 Aug 27 10:39 HTTP_FORBIDDEN.html.var
-rw------- 1 root root 14338 Aug 27 10:39 HTTP_GONE.html.var
(...)
drwxr-xr-x 2 root root  4096 Aug 27 10:39 include
-rw------- 1 root root  2125 Aug 27 10:39 README
  • Running state.apply, no changes
  Name: /data/orange-apache/errorPages - Function: file.directory - Result: Clean Started: - 09:52:54.988513 Duration: 3.479 ms
  • Changing manually the include directory permissions
[root@flxccs-d03-tst errorPages]# chmod a-x include
[root@flxccs-d03-tst errorPages]# ll
total 204
-rw------- 1 root root  4539 Aug 27 10:39 contact.html.var
-rw------- 1 root root  9941 Aug 27 10:39 HTTP_BAD_GATEWAY.html.var
-rw------- 1 root root  7112 Aug 27 10:39 HTTP_BAD_REQUEST.html.var
-rw------- 1 root root 12578 Aug 27 10:39 HTTP_FORBIDDEN.html.var
-rw------- 1 root root 14338 Aug 27 10:39 HTTP_GONE.html.var
(...)
drw-r--r-- 2 root root  4096 Aug 27 10:39 include
-rw------- 1 root root  2125 Aug 27 10:39 README
  • Running state.apply, permissions are set correctly
----------
          ID: flxccs_fix_apache_errorpages
    Function: file.directory
        Name: /data/orange-apache/errorPages
      Result: True
     Comment: Directory /data/orange-apache/errorPages updated
     Started: 09:54:01.191557
    Duration: 175.081 ms
     Changes:   
              ----------
              mode:
                  0644
[root@flxccs-d03-tst errorPages]# ll
total 204
-rw-r--r-- 1 root root  4539 Aug 27 10:39 contact.html.var
-rw-r--r-- 1 root root  9941 Aug 27 10:39 HTTP_BAD_GATEWAY.html.var
-rw-r--r-- 1 root root  7112 Aug 27 10:39 HTTP_BAD_REQUEST.html.var
-rw-r--r-- 1 root root 12578 Aug 27 10:39 HTTP_FORBIDDEN.html.var
-rw-r--r-- 1 root root 14338 Aug 27 10:39 HTTP_GONE.html.var
(...)
drwxr-xr-x 2 root root  4096 Aug 27 10:39 include
-rw-r--r-- 1 root root  2125 Aug 27 10:39 README

Versions Report

# salt --versions-report
Salt Version:
           Salt: 2018.3.2
 
Dependency Versions:
           cffi: 1.11.5
       cherrypy: unknown
       dateutil: Not Installed
      docker-py: Not Installed
          gitdb: Not Installed
      gitpython: Not Installed
          ioflo: Not Installed
         Jinja2: 2.10
        libgit2: 0.26.5
        libnacl: Not Installed
       M2Crypto: Not Installed
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.4.6
   mysql-python: Not Installed
      pycparser: 2.18
       pycrypto: 2.6.1
   pycryptodome: Not Installed
         pygit2: 0.26.4
         Python: 3.4.8 (default, Jul 25 2018, 22:08:49)
   python-gnupg: Not Installed
         PyYAML: 3.11
          PyZMQ: 15.3.0
           RAET: Not Installed
          smmap: Not Installed
        timelib: Not Installed
        Tornado: 4.4.2
            ZMQ: 4.1.4
 
System Versions:
           dist: centos 7.5.1804 Core
         locale: UTF-8
        machine: x86_64
        release: 3.10.0-862.11.6.el7.x86_64
         system: Linux
        version: CentOS Linux 7.5.1804 Core
@garethgreenaway

This comment has been minimized.

Copy link
Member

commented Aug 30, 2018

I believe this is a similar problem that was reported in #48336 and fixed in #48399.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.