Hafiz Muhammad Shafiq
Hafiz Muhammad Shafiq

Reputation: 8680

Maintain sub-folder and files permission as in source: puppet

I have configured a master- client setup for puppet. I have a complete project that I have to copy to agents. There are some scripts (executable) and some jars and some configuration files. Now When I copy copy project, all permissions are changed. I know I can user "mode" to set the permission but the problem is that it is applied to whole files i.e., all sub-folders and files in the given folder. What is the best way to maintain the all documents permission on client side as it was on source (master) side.

Upvotes: 1

Views: 275

Answers (1)

bodgit
bodgit

Reputation: 293

The file resource has the attribute source_permissions. So you could do something like this:

file { '/some/where':
    ...
    source_permissions => 'use', # or 'use_when_creating'
}

Upvotes: 2

Related Questions