On Sun, Jul 03, 2005 at 12:30:02PM -0500, Lance Albertson wrote: > Currently, I'm wanting to make sure a file in all the home directories > is a specific permission. The problem is, the file may not exist so > cfengine should just ignore it. When that happens I always get output of > it simliar to this: > > cfengine:host: Directory /home/foouser/.foo cannot be accessed in files > > Is there a missing option I can use to make this work or is this just > the nature of cfengine?
Couldn't you just do it recursively? Something like this: files: any:: /home/*/.foo recurse=1 action=fixall m=644 Not sure if recurse should be 1 or 2 (I don't know where it starts counting). Haven't tested, and it depends on your directory structure for directories anyway. I just googled it and found the example in http://cclib.nsu.ru/projects/gnudocs/gnudocs/cfengine/cfengine_35.html If the recursion isn't what you want, maybe you could do a test in groups and use it afterwards? Like this: groups: any:: foo_exists = ( FileExists(/home/foouser/.foo) ) files: foo_exists:: /home/foouser/.foo m=644 That way, the rule in files would only be run on existing files. Hope this helps. I'm not quite sure what you are doing, so this advice might not fit your situation :-) -- Knut Auvor Grythe ITEA Systemdrift _______________________________________________ Help-cfengine mailing list Help-cfengine@gnu.org http://lists.gnu.org/mailman/listinfo/help-cfengine