説明
Description of Issue
when using file.managed, an immutable file causes an error. When using attrs: "" - that removes immutable, but only AFTER the content change (that fails, immutable is never removed)
Setup
echo "aa" > /somefile chattr +i /somefile
Steps to Reproduce Issue
state: some file: file.managed: - name: /somefile - attr: "" - content: "xx"
salt runs with: Failed to commit change: [Errno 1] Operation not permitted if the file content is ok, immutable flag gets properly removed
Versions Report
Salt Version: Salt: 2018.3.4
Dependency Versions: cffi: 1.6.0 cherrypy: unknown dateutil: Not Installed docker-py: Not Installed gitdb: 0.6.4 gitpython: 1.0.1 ioflo: Not Installed Jinja2: 2.7.2 libgit2: 0.26.3 libnacl: Not Installed M2Crypto: 0.28.2 Mako: Not Installed msgpack-pure: Not Installed msgpack-python: 0.5.6 mysql-python: 1.2.5 pycparser: 2.14 pycrypto: 2.6.1 pycryptodome: Not Installed pygit2: 0.26.4 Python: 2.7.5 (default, Oct 30 2018, 23:45:53) python-gnupg: Not Installed PyYAML: 3.11 PyZMQ: 15.3.0 RAET: Not Installed smmap: 0.9.0 timelib: Not Installed Tornado: 4.2.1 ZMQ: 4.1.4
System Versions: dist: centos 7.6.1810 Core locale: UTF-8 machine: x86_64 release: 4.15.0-54-generic system: Linux version: CentOS Linux 7.6.1810 Core