stringZ has asked for the wisdom of the Perl Monks concerning the following question:
This is the point I stuck. I would like to add the special user Everyone and grant full access. Sometimes $dir->Add( { Account => NULL, Mask => FULL ); does it, sometimes not, but I think this last piece of code is nasty. Everyone is tricky because its name is something else on different translations of Windows. My script should run even on these as well. There should be some special and unique ID for Everyone in Windows, because if I bring a file within an archive, from a translated Windows to a non-translated one, it's still Everyone (however it's written in the language that Windows was translated to). Is there any way of setting the owner of a file/directory without specifying the owner's name?use Win32::Perms; my $file = new Win32::Perms('lock.tmp'); $file->Remove(-1); $file->Set(); $file->Close();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Grant full access to "Everyone" on Win32 (regardless to its translations)
by BrowserUk (Patriarch) on Oct 21, 2011 at 23:50 UTC | |
by stringZ (Acolyte) on Oct 22, 2011 at 00:09 UTC | |
by Anonymous Monk on Oct 22, 2011 at 02:34 UTC | |
by BrowserUk (Patriarch) on Oct 22, 2011 at 00:36 UTC | |
|
Re: Grant full access to "Everyone" on Win32 (regardless to its translations)
by locked_user sundialsvc4 (Abbot) on Oct 22, 2011 at 13:29 UTC |