User story #3675
closed
Technique "Set the permissions on files": should allow specifying regex to match files
Added by Michael Gliwinski over 11 years ago.
Updated almost 3 years ago.
Description
Currently defining same ownership/permissions for a list of files/directories in filesPermissions technique (Set permissions on files) is quite tedious as same settings have to be repeated for each file/dir. It would be great if using a regular expression in place of path was allowed.
Since CFEngine already allows this, implementation should be quite simple. The only reason it doesn't work today is because the technique uses fileexists
function to check if the path exists. I was thinking about modifying it so that check is only done if the path does not contain any regular expression meta-characters. Or maybe removing the check altogether would be fine?
I can work on the implementation but wanted to discuss this first. What do you think about such change?
- Project changed from Rudder to 24
- Subject changed from filesPermissions technique should allow specifying regex to match files to Technique "Set the permissions on files": should allow specifying regex to match files
- Category deleted (
Techniques)
That could be a good idea. We take your proposition into account and will return you our feedback as soon as possible. Thank you !
Michael, we have figured out that your proposition fit exactly Rudder purpose.
In our point of view, the good way to do it should be "add another and optionnal textbox to specify the regexp of the files matched".
This regexp could be used in the CFEngine code to add a file_select body with a leaf_name (https://cfengine.com/archive/manuals/cf3-Reference#file_005fselect-in-files) matching it.
The fileexists() should be left as-is or workaround to be functionnal.
- Project changed from 24 to Rudder
- Category set to Techniques
- Target version set to Ideas (not version specific)
This won’t be added to that technique, please use the technique editor for that. If you are missing some capabilities in it, please open a ticket for that need.
- Status changed from New to Rejected
Also available in: Atom
PDF