See win32-file, available on the RAA. Also, check out
http://www.rubyforge.org/projects/win32utils\.
Regards,
Dan
···
-----Original Message-----
From: happy-jack [mailto:timgerr@gmail.com]
Sent: Wednesday, November 09, 2005 12:27 PM
To: ruby-talk ML
Subject: Ruby Windows administration
OK, I have been learning ruby for a few weeks now and I have
not really done anything with it. I have been doing my W2k3
administration with Perl now I want to start using Rubu.
Again I am new so be nice ;).
I was wondering if ruby can create a folder (I know that it can do
this) and set the security permissions on this folder. I
want to be able to give users NTFS rights, not share rights.
Can this be done???
Thanks,
Timgerr
What I want do is grant ntfs rights to a folder. I did not see
anything on folder and domain user.
Thanks
happy-jack wrote:
What I want do is grant ntfs rights to a folder. I did not see
anything on folder and domain user.
Thanks
If win32-etc doesn't do what you need, then you can use Ruby's win32ole package. It's usually pretty straightforward to translate VB to equivalent code.
Note that I'm still futzing with the sys-admin package (http://www.rubyforge.org/projects/sysutils\), where I plan to add the ability to add, configure and delete users, but I haven't settled on the API yet.
Regards,
Dan
Quoting happy-jack <timgerr@gmail.com>:
What I want do is grant ntfs rights to a folder. I did not see
anything on folder and domain user.
Unfortunately that is a really ugly can of worms that you aren't
likely to find a ready-made solution for in any language.
The only option that really works is to use the Windows NT 3.5
security APIs in C, but those require you to manually
marshal/unmarshal the data structures to/from flat buffers
yourself.
Windows NT 4 introduced some additional API functions that would
have been easier to use, but they were never implemented correctly,
at least up through and including Windows 2000. I can only assume
that Microsoft stuck with the NT 3.5 security APIs for use in their
own software.
-mental