HomePhorge

(#2927) Support symbolic file modes.
24f2a65d9be1Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

(#2927) Support symbolic file modes.

This adds a new feature, support for symbolic file modes, to Puppet. In
addition to being able to specify the octal mode, you can now use the same
symbolic mode style that chmod supports:

file { "/example": mode => "u=rw,go=r" }

This also supports relative file modes:

file { "/relative": mode = "u+w,go-wx" }

Support is based on the common GNU and BSD symbolic modes of operation; you
specify a comma separated list of actions to take in each you can sit:

The user (u), group (g), other (o), or all (a) of the permission map.

You can modify the ability to read (r), write (w), execute / search (x) on a
file or directory.

You can also modify the sticky bit (t), or the setuid and setgid bits (s).

Finally, you can set conditional execute permissions (X), which will result in
the file having the execute bit if the target is a directory, or if the target
had *any* execute bit set. (eg: g+X will set x if the original was u=x,g=.)

Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>

Details

Provenance
Daniel Pittman <daniel@puppetlabs.com>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPU48726b662d2f: Finer-grained protocol for property `insync?`.
Branches
Unknown
Tags
Unknown

Event Timeline

Daniel Pittman <daniel@puppetlabs.com> committed rPU24f2a65d9be1: (#2927) Support symbolic file modes. (authored by Daniel Pittman <daniel@puppetlabs.com>).Jan 13 2012, 3:08 AM