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

Dominique Dumont dominique.dumont at hp.com
Wed Nov 19 11:22:58 UTC 2008


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 ?

(I think this behavior is confusing when you're trying to create a
configuration from scratch with Augeas)

Here's how you can reproduce this behavior:

$ mkdir -p /tmp/root/etc
$ augtool -r /tmp/root/
augtool> set  /files/etc/ssh/sshd_config/X11Forwarding yes
augtool> save
Saving failed
augtool> print /augeas/files/etc/ssh/sshd_config/
/augeas/files/etc/ssh/sshd_config
/augeas/files/etc/ssh/sshd_config/error = "open_augnew"
/augeas/files/etc/ssh/sshd_config/error/message = "No such file or directory"
augtool> quit
$ mkdir -p /tmp/root/etc/ssh
$ augtool -r /tmp/root/
augtool> set  /files/etc/ssh/sshd_config/X11Forwarding yes
augtool> save
Saved 1 file(s)
augtool> quit

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