ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> perl-win32-admin
perl-win32-admin
RE: Win32::Perms
by Wiechel, Ben other posts by this author
Mar 28 2003 6:02PM messages near this date
view in the new Beta List Site
RE: Win32::Perms | RE: Win32::Perms
I just ran your script (changing the dir and the user) and it worked fine.
However, the perms show up under the special perms vs. the main security
tab.

Two assumptions apply here.  First, for this to work, you must be applying
these to a folder on an NTFS drive.  Second, you must have rights to modify
perms.  I assume these two are true.

--
Benjamin D. Wiechel
Xerox Connect
ben.wiechel@[...].com
Phone: 937-221-3443
Fax: 937-221-4499
Pager: 888-733-8075 / 8887338075@[...].net
Mobile: 513-254-7071 



-----Original Message-----
From: Raymond Forbes [mailto:rforbes@[...].net] 
Sent: Friday, March 28, 2003 12:30 PM
To: Wiechel, Ben; perl-win32-admin@[...].com
Subject: RE: Win32::Perms


ok, that is kinda weird, but i guess nothing can be done about that.

so, this is the heart of my problem.  i can't seem to get this module to
do much of anything useful for me. i can use the Remove (-1) to
COMPLETELY screw up the permissions on an object, but this never comes
through.

use strict;
use Win32;
use Win32::Perms;


my $user;
my $path;
my $result;
my $perm_object;
my $administrator;
my $admin_group;

$user = "rforbes";

$path = "c:\\inetpub\\wwwroot\\$user";

$perm_object = new Win32::Perms ($path);

$perm_object ->  Allow ($user, CHANGE_DIR, DIR);
$perm_object ->  Allow ($user, CHANGE_FILE, FILE);

$result = $perm_object ->  Set ();

	print "$result\n";

$perm_object ->  Dump ($perm_object);


the set and the dump work just fine, but i am always getting a 0 back
for the allow.  


-----Original Message-----
From: Wiechel, Ben [mailto:Ben.Wiechel@[...].com] 
Sent: Friday, March 28, 2003 9:36 AM
To: Raymond Forbes; perl-win32-admin@[...].com
Subject: RE: Win32::Perms


Two things:

CheckSD is not a method in Win32::Perms.  I assume you were intending to
use GetSD, which should make your code work.

Second, after doing some testing, it appears that ResolveSID works fine
against a domain, but will not return a SID for a local user.  I could
not return a local user SID no matter what I changed.

--
Benjamin D. Wiechel
Xerox Connect
ben.wiechel@[...].com
http://members.toast.net/strycher/

 




-----Original Message-----
From: Raymond Forbes [mailto:rforbes@[...].net] 
Sent: Friday, March 28, 2003 3:52 AM
To: perl-win32-admin@[...].com
Subject: RE: Win32::Perms


let's try that again...

	- --------------------------------------------------------- 
	
	
	i am at my wits end on this one.
	 
	first, pertinent info...
	 
	c:\dev\ioactive> perl -v
	 
	This is perl, v5.6.1 built for MSWin32-x86-multi-thread
	(with 1 registered patch, see perl -V for more detail)
	 
	Copyright 1987-2001, Larry Wall
	 
	Binary build 635 provided by ActiveState Corp.
http://www.ActiveState.com
	Built 15:34:21 Feb  4 2003
	 
	Win32-Perms      [0.2002.06.05] The Win32::Perms extension for
Win32 X86.
	 
	 
	ok, now to the problem.  for some reason i cannot get this to
work in any reasonable way.  i am not sure if i am doing something
wrong, or ifit is a misconfiguration but i thought i would run it by
everybody here.
	 
	here are some examples of things that don't work.... 
	 
	use Win32::Perms;
	$dir = 'c:/inetpub';
	 
	$perm = new Win32::Perms ($dir);
	 
	$result = $perm ->  CheckSD();
	 
	print $result;
	

	
	( $result is always 0 here)
	 
	$result2 = Win32::Perms::ResolveSid ("W2KASVM1\\administrator");
	print "the sid is:$result2\n";
	 
	this returns nothing in $result2.  not sure if it is a NULL or
UNDEF or what.
	 
	 
	the part that is so frustrating is it's impossible to see what
is actually going wrong.  since i can't get the Win32 error messages to
bubble to the top, i don't even know where to begin.
	 
	   
	
	 
	 
	 
	 
	 

_______________________________________________
Perl-Win32-Admin mailing list Perl-Win32-Admin@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________
Perl-Win32-Admin mailing list
Perl-Win32-Admin@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved