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

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



On Wed, Nov 19, 2008 at 12:48:52PM +0100, David Lutterkort wrote:
> 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 ?
> 
> It's definitely a bug - what has kept me from fixing this is that I am
> not sure what ownership/mode to set on such newly created directories. 

I'd say it was a feature, precisely because its impossible to know 
what correct ownership/mode is relevant. Only the application using
augeas can have this knowledge.

What scenario would you really encounter where /etc/ssh did not already
exist, but where you wanted to create the config file. If you actually
had SSH installed, it would always exist, and if you didn't have it
installed, then its not a problem if creating the config file fails.

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

That'd certainly be wrong for a number of scenarios where you have
security sensitive directories or config files that should not be
visible to non-root users. Then again, picking 0700 would also be
wrong for a large number of cases. I don't see how Augeas can pick
any correct setting without application help.

Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|


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