If I have a promise with a
copy_frompromise where the body specifies that permissions should be preserved and I also have apermsbody on the same promise what is expected to happen?
The files type promises documentation describes the normal order of files
promise attributes during promise actuation.
The documentation notes:
- file presence (
create|copy|link) - permissions
- file content
So the explicitly specified permissions should win in the end. Here is a small
example illustrating the behavior of a copy_from body that is preserving
permissions when combined with perms body specifying explicit permissions.
|
|
Results in this output:
R: CFEngine 3.11.0 R: /home/nickanderson/org/cfengine3-8600Hlr mode = 600 R: /home/nickanderson/org/cfengine3-8600Hlr.copy_preserve mode = 600 R: /home/nickanderson/org/cfengine3-8600Hlr.copy_preserve_and_perms mode = 777