wilsond has asked for the wisdom of the Perl Monks concerning the following question:
Edit: The cacls.exe command line utility included with Windows seems to work very well for me. It works in all of the Windows versions I've tested: Windows 2000, Windows XP, Windows Vista, and Windows 7. If you need a simple ACL update utility, you can just use it as it seems to reliably exist in all Windows versions at least as new as Win2k. Just be sure to use echo y| cacls.exe .... format ("y" touching the pipe) to use it in an automated fashion.
How would one set file permissions in Windows?
I've made an installer that installs a utility written in Perl and "compiled" with ActiveState's PDK. But, it seems, by default the files are "Power Users" writable as well as original installer user writable, which are bad in my case. I'd like to specifically say "System && Admin Group, no one else" writable. I'd even better like a specific file to be non-readable as well. All of this is in one directory within the "Program Files" dir.
I've found Win32::Security::ACL, but it's mega-confusing. The extent of my real knowledge of Windows file ACLs is how to click the buttons in the Security tab. If it were going onto a few boxes, I'd just do that. But in my case, it's going on about 2,000 machines.
edit: This case is in XP, but it will be going onto Win2k and Vista as well, though not as large quantity.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Set file permissions using Perl in Windows?
by CountZero (Bishop) on Jan 10, 2009 at 19:50 UTC | |
by wilsond (Scribe) on Jan 12, 2009 at 12:57 UTC | |
|
Re: Set file permissions using Perl in Windows?
by Corion (Patriarch) on Jan 10, 2009 at 16:52 UTC | |
by wilsond (Scribe) on Jan 10, 2009 at 16:59 UTC | |
by wilsond (Scribe) on Jan 10, 2009 at 17:03 UTC | |
|
Re: Set file permissions using Perl in Windows?
by cdarke (Prior) on Apr 08, 2010 at 11:29 UTC | |
|
Re: Set file permissions using Perl in Windows?
by hawtin (Prior) on Jan 11, 2009 at 15:37 UTC | |
by CountZero (Bishop) on Jan 12, 2009 at 06:47 UTC |