[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, upstream, updated. puppet-0.24.5-rc3-1601-gf8c1b08

James Turnbull james at lovedthanlost.net
Fri Jan 15 09:07:26 UTC 2010


The following commit has been merged in the upstream branch:
commit 562909281f2e0bd21fed922600027f0e9a47f5ec
Author: James Turnbull <james at lovedthanlost.net>
Date:   Wed Nov 25 10:50:35 2009 +1100

    Added additional documentation to file mode attribute.

diff --git a/lib/puppet/type/file/mode.rb b/lib/puppet/type/file/mode.rb
index fd9c27a..b9ad8da 100755
--- a/lib/puppet/type/file/mode.rb
+++ b/lib/puppet/type/file/mode.rb
@@ -5,7 +5,24 @@ module Puppet
     Puppet::Type.type(:file).newproperty(:mode) do
         require 'etc'
         desc "Mode the file should be.  Currently relatively limited:
-            you must specify the exact mode the file should be."
+            you must specify the exact mode the file should be.
+ 
+            Note that when you set the mode of a directory, Puppet always
+            sets the search/traverse (1) bit anywhere the read (4) bit is set. 
+            This is almost always what you want: read allows you to list the
+            entries in a directory, and search/traverse allows you to access 
+            (read/write/execute) those entries.)  Because of this feature, you 
+            can recursively make a directory and all of the files in it 
+            world-readable by setting e.g.::
+
+                file { "/some/dir":
+                  mode => 644,
+                  recurse => true,
+                }
+
+            In this case all of the files underneath ``/some/dir`` will have 
+            mode 644, and all of the directories will have mode 755."
+
         @event = :file_changed
 
         # Our modes are octal, so make sure they print correctly.  Other

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list