Setting security on remote_directory files in Windows


#1

Hi,

Trying to create a directory containing files from a cookbook using the
following:

remote_directory root_path do
source 'AppRoot’
rights :full_control, ‘NETWORK SERVICE’, :applies_to_children => true
recursive true
end

The directory & files are created ok, and security is set on the directory.

But the files do not get the required permissions…no mention of NETWORK
SERVICE for the files.

Any clues?

/Jeppe


#2

On Thu, Jun 13, 2013 at 2:37 PM, Jeppe Nejsum Madsen jeppe@ingolfs.dkwrote:

Hi,

Trying to create a directory containing files from a cookbook using the
following:

remote_directory root_path do
source 'AppRoot’
rights :full_control, ‘NETWORK SERVICE’, :applies_to_children => true
recursive true
end

The directory & files are created ok, and security is set on the directory.

But the files do not get the required permissions…no mention of NETWORK
SERVICE for the files.

Any clues?

/Jeppe

Strange, this works:

remote_directory root_path do
source 'AppRoot’
end

directory root_path do
rights :full_control, 'NETWORK SERVICE’
end

It would imagine this to be sufficient:

remote_directory root_path do
source 'AppRoot’
rights :full_control, 'NETWORK SERVICE’
end

But specifying rights on remote_directory doesn’t work, even with the
subsequent directory resource…

Bug?

/Jeppe


#3

On Thursday, June 27, 2013 at 6:31 AM, Jeppe Nejsum Madsen wrote:

On Thu, Jun 13, 2013 at 2:37 PM, Jeppe Nejsum Madsen <jeppe@ingolfs.dk (mailto:jeppe@ingolfs.dk)> wrote:

Hi,

Trying to create a directory containing files from a cookbook using the following:

remote_directory root_path do
source 'AppRoot’
rights :full_control, ‘NETWORK SERVICE’, :applies_to_children => true
recursive true
end

The directory & files are created ok, and security is set on the directory.

But the files do not get the required permissions…no mention of NETWORK SERVICE for the files.

Any clues?

/Jeppe

Strange, this works:

remote_directory root_path do
source 'AppRoot’
end

directory root_path do
rights :full_control, 'NETWORK SERVICE’
end

It would imagine this to be sufficient:

remote_directory root_path do
source 'AppRoot’
rights :full_control, 'NETWORK SERVICE’
end

But specifying rights on remote_directory doesn’t work, even with the subsequent directory resource…

Bug?

/Jeppe
Sorry for the late reply. You need files_rights to control the permissions on the files, similar to how you use files_mode to set them on *nix.


Daniel DeLeo