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

Dominique Dumont dominique.dumont at hp.com
Wed Nov 19 16:59:42 UTC 2008


"Daniel P. Berrange" <berrange at redhat.com> writes:

> 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.

On the other hand, each lens contains application specific
informations. And the guy who maintain the lens should have the
knowledge regarding the "best" ownership/mode for its application
specific directory.

So is there any possibility to write this info in the lens ? (or in a
file beside the lens)

> 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.

That's correct for ssh. For more complex configuration (like apache),
creating a directory on the fly may be required.

>> 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.

May be fallback to umask settings if no other information is available ?

All the best.

-- 
Dominique Dumont 
"Delivering successful solutions requires giving people what they
need, not what they want." Kurt Bittner




More information about the augeas-devel mailing list