Project

General

Profile

Actions

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.

Status:
Rejected
Priority:
N/A
Assignee:
-
Category:
Techniques
UX impact:
Suggestion strength:
User visibility:
Effort required:
Name check:
Fix check:
Regression:

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?

Actions #1

Updated by Nicolas PERRON over 11 years ago

  • 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 !

Actions #2

Updated by Nicolas PERRON over 11 years ago

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.

Actions #3

Updated by Benoît PECCATTE almost 10 years ago

  • Project changed from 24 to Rudder
  • Category set to Techniques
Actions #4

Updated by Benoît PECCATTE over 8 years ago

  • Target version set to Ideas (not version specific)
Actions #5

Updated by Alexis Mousset almost 3 years ago

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.

Actions #6

Updated by Alexis Mousset almost 3 years ago

  • Status changed from New to Rejected
Actions

Also available in: Atom PDF