bug-cfengine
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: editfiles messing up file permissions?


From: Mark . Burgess
Subject: Re: editfiles messing up file permissions?
Date: Mon, 1 Jan 2001 14:10:06 +0100 (MET)

On  1 Jan, Hanus Adler wrote:
> Hi
> 
> it seems that cfengine (version 1.6.1 on Linux) doesn't preserve file
> permissions when the file is edited with editfiles. I don't think this
> behaviour is correct, at least I didn't expect it to happen. I found
> nothing about it in the documentation.
> 
> I would suggest that instead of removing the original file cfengine
> might just overwrite the file with new contents, that way the
> owner/permissions would remain untouched.
> 
> BTW I also tried to use the following setup with Umask "022" but it says
> "cfengine:dwarf: Unknown action in editing of file /etc/hosts". Am I
> missing something?
> 
> editfiles:
> 
>       any::
>               { /etc/hosts
>                       DefineClasses "RepairPermissions"
>                       Umask "022"
> 
>                       SetLine "127.0.0.1      localhost       
> localhost.localdomain"
>                       AppendIfNoLineMatching "^127\.0\.0\.1.*"
>               }
> 
> 
> greetings
> 
> Hanus Adler
> 


This works fine for me - maybe you are not actually using 1.6.1, but
an earlier version which contained a bug. The Umask problem
would tend to confirm this.

Mark

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Work: +47 22453272            Email:  address@hidden
Fax : +47 22453205            WWW  :  http://www.iu.hio.no/~mark
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~





reply via email to

[Prev in Thread] Current Thread [Next in Thread]