salt icon indicating copy to clipboard operation
salt copied to clipboard

salt.modules.win_file.chown() and chgrp() do not change security descriptor

Open Geo23589 opened this issue 13 years ago • 5 comments

In the Windows file system, the security descriptor information is irrespective of an optional discretionary access control list (DACL). To change the owner or group, one must change the information in the security descriptor, outside of the DACL.

See here for details: http://msdn.microsoft.com/en-us/library/windows/desktop/aa379561%28v=vs.85%29.aspx

I am working on fixing this, and will submit a pull request when finished with it.

Geo23589 avatar Nov 26 '13 15:11 Geo23589

Thanks for the report! And thanks for working on a fix, look forward to the pull req!

basepi avatar Nov 26 '13 18:11 basepi

Thanks, @Geo23589!

UtahDave avatar Nov 26 '13 18:11 UtahDave

@UtahDave or @basepi , Do you want win_file.chgrp() and .chown() to return anything on success? The current version returns file.chown() etc. , which returns os.chown(), which doesn't return anything as far as I know. I have it working, but want to know your thoughts...

Geo23589 avatar Nov 29 '13 17:11 Geo23589

Let's try to mimic what those functions do on Linux, if possible On Nov 29, 2013 10:07 AM, "Geoff Short" [email protected] wrote:

@UtahDave https://github.com/UtahDave or @basepihttps://github.com/basepi, Do you want win_file.chgrp() and .chown() to return anything on success? The current version returns file.chown() etc. , which returns os.chown(), which doesn't return anything as far as I know. I have it working, but want to know your thoughts...

— Reply to this email directly or view it on GitHubhttps://github.com/saltstack/salt/issues/8827#issuecomment-29528005 .

UtahDave avatar Nov 29 '13 17:11 UtahDave

Fixed with merge #8934

Geo23589 avatar Jan 14 '14 01:01 Geo23589