I would like to make sure the files that get added to a certain directory inherits the parent directory's permission and that permission never changes. I guess it's called sticky bit but cannot find a way to do this via puppet. Any info would be much appreciate it. I just need something beside exec to do this and I would be adding this to my init.pp. Thank you
Asked
Active
Viewed 132 times
1 Answers
2
IIRC, you can do this with the mode
parameter on a file
resource by setting the octal permissions correctly:
e.g.
file { "foo":
path => '/home/user/foo'
type => 'directory'
mode => '1750'
}
or similar. Syntax not guaranteed to be correct!
If you wanted to do this on files in a directory, you could tie this in to some of the good recipes from the Puppet Cookbook, perhaps by managing the directory and any files you want and then using a resource collector to capture the unlisted files and set permissions?

shearn89
- 3,403
- 2
- 15
- 39
-
1Thank you, I already have the file permission stuff straighten out. Was trying to find a way to use the sticky bit on a directory – Tina Mar 11 '22 at 20:11