It also has to do with Puppet's implementation of File resources: it
creates in memory Ruby objects for every file and directory it finds
recursively, so combine that with the md5 summing and you'll blow out
your CPU and memory usage very quickly. I've done something like this
in the past:

$path="/opt/jetty-6.1.26"
exec { "enforce ${path} permissions":
  command => "/usr/bin/find ${path} ! -uid jetty -exec chown jetty {}
\;",
  onlyif  => "test $(/usr/bin/find ${path} -uid jetty | wc -l) -gt 0",
}

I wouldn't call it elegant, but much faster.

On Nov 1, 1:34 pm, madAndroid <andrewsta...@gmail.com> wrote:
> how big is the directory structure?
>
> we've had incredibly painful experiences trying to manage directory
> perms/ownerships on large directory trees...
> so much so that we only set the perms on a few of the top level
> directories and left the rest
>
> it's something to do with needing to do an md5 and stat on every file
> in the tree that slows it down
>
> how important is it that the permissions are forced?
> we decided eventually that the file attr wouldn't necessarily change
> unless someone had access to the directory via ssh..
> and only the sys admins do to the server in question anyway
>
> hopefully there's a better way of doing it ... calling all gurus?
>
> cheers,
> Andrew
>
> On Nov 1, 11:15 am, Robert Atkins <snikta.tre...@gmail.com> wrote:
>
>
>
>
>
>
>
> > I've just tried this (we assume /opt/jetty-6.1.26 already exists):
>
> > file { "/opt/jetty-6.1.26":
> >         owner => "jetty",
> >         group => "users",
> >         recurse => true,
>
> > }
>
> > ... but it's taking an *age*. What's the Right Way?
>
> > Cheers, Robert.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@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=en.

Reply via email to