> On Thu, Nov 19, 2009 at 3:53 PM, Dan Bode <d...@reductivelabs.com> wrote:
> > On Thu, Nov 19, 2009 at 11:52 AM, Andrew Schulman
> > <google-groups-and...@sneakemail.com> wrote:
> >>
> >> The Type Reference lists 8 read-only type attributes, but I can't find any
> >> information in the documentation about how to use them.  Are they usable,
> >> and if so how?
> >>
> >> Here's my #1 example:  when I set the mode on a file resource, I want to
> >> set a different default mode for a file than for a directory.  Files have
> >> an attribute named type, which the docs say is "a read-only state to check
> >> the file type".  That would seem to be the right thing, so I want to write
> >> something like
> >>
> >
> >
> > that doesnt exactly work as you described it. As a feature, if you set up
> > default mode as 644, puppet assumes that you want 755 on dirs and not 644.
> 
> Really? That just seems like a horrible feature.

Actually I think it's the right thing to do.  There's apparently no way at
present to tell Puppet how to handle files and directories differently when
recurse is true, so there needs to be a reasonable default.  Yes, it is possible
to want a directory to be readable but not executable, but by far the more
common case is to want either both or neither.

So I hope that Puppet's rule is:  "when recurse is true, anywhere the read (4)
bit is on in the mode setting, add the execute (1) bit to directories."

Whatever the rule is, it needs to be documented under file.mode.

--

You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=.


Reply via email to