[augeas-devel] Re: Augeas save does not create directory when needed

Free Ekanayaka free at 64studio.com
Wed Nov 19 12:00:56 UTC 2008


Hi David,

|--==> On Wed, 19 Nov 2008 12:48:52 +0100, David Lutterkort <lutter at redhat.com> said:

  DL> On Wed, 2008-11-19 at 12:22 +0100, Dominique Dumont wrote:
  >>Hello
  >>
  >>When saving a file (in this case /etc/ssh/sshd_config), augeas is able
  >>to create the sshd_file file, but not the ssh directory.
  >>
  >>Is that a feature or a bug ?

  DL> It's definitely a bug - what has kept me from fixing this is that I am
  DL> not sure what ownership/mode to set on such newly created directories. 

  DL> The simplest would be to use teh current user/group and some default
  DL> permission like 0755, though that might be way too open. The issue is
  DL> logged as ticket #3 [1] - if you have any other suggestions, please add
  DL> them to the ticket.

I would suggest creating the directory using the default umask values
of the augeas process being executed, making no decision about
ownership or permissions at all. Such choices would be entirely up to
the user, which can get the desired effect by setting the proper umask
and/or running augeas under a certain uid/gid.

Hope it's clear enough :)

Ciao!

Free




More information about the augeas-devel mailing list