Skip to content

file.recurse file_mode: keep doesn't work with salt-ssh #54733

@nergdron

Description

@nergdron

Description of Issue

When recursively copying a directory to a minion using the file.recurse state, when using the file_mode: keep options, permissions from the source host on files are not actually kept intact, despite documentation saying they will be:
https://docs.saltstack.com/en/latest/ref/states/all/salt.states.file.html#salt.states.file.recurse

Setup

/root/some_dir:
  file.recurse:
    - source: salt://{{ slspath }}/some_dir
    - user: root
    - group: root
    - file_mode: keep

Steps to Reproduce Issue

Use salt-ssh to apply the state to a remote system, watch as all files are created with 600 permissions instead of their source permissions.

Versions Report

Salt Version:
           Salt: 2019.2.0
 
Dependency Versions:
           cffi: 1.12.3
       cherrypy: Not Installed
       dateutil: 2.7.3
      docker-py: Not Installed
          gitdb: Not Installed
      gitpython: Not Installed
          ioflo: Not Installed
         Jinja2: 2.10.1
        libgit2: Not Installed
        libnacl: Not Installed
       M2Crypto: Not Installed
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.6.1
   mysql-python: Not Installed
      pycparser: 2.19
       pycrypto: 2.6.1
   pycryptodome: Not Installed
         pygit2: Not Installed
         Python: 3.7.3 (default, Aug 20 2019, 17:04:43)
   python-gnupg: Not Installed
         PyYAML: 5.1
          PyZMQ: 18.0.2
           RAET: Not Installed
          smmap: Not Installed
        timelib: Not Installed
        Tornado: 4.5.3
            ZMQ: 4.3.1
 
System Versions:
           dist: Ubuntu 19.04 disco
         locale: UTF-8
        machine: x86_64
        release: 5.0.0-25-generic
         system: Linux
        version: Ubuntu 19.04 disco

Metadata

Metadata

Assignees

No one assigned

    Labels

    ConfirmedSalt engineer has confirmed bug/feature - often including a MCVEFeaturenew functionality including changes to functionality and code refactors, etc.documentationRelates to Salt documentationpending-discussionThe issue or pull request needs more discussion before it can be closed or mergedseverity-low4th level, cosemtic problems, work around existstime-estimate-sprint

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions