Matt Blatchley writes ..


>Does anyone know of a way to use perl and CGI to have the following:
>
>html page w/ form to get stdin from the user for username and
>password.(basic),

>pass the variables to the perl script which then modifies permissions
>for a specific folder on NT and allows the user to then have access to
>a particular folder after having the password emailed to the user...

yes you can do it .. but the CGI program (be it Perl or ASP/vbscript) will
only have the security privileges of whatever account the web server is
configured to access the CGI directory as

this is usually a builtin account called something like

  IUSR_machinename

and it's usually only a Guest .. because Guests can't change permissions on
directories then you'll run into problems

once you've changed that account then you have to be REALLY careful with the
programs that you write and the web server in general (especially with
WebDAV now in IIS5) because users will have higher privileges on your system

to actually change the permissions you can use a Perl module called

  Win32::FileSecurity

which ships with the standard distribution of Win32 Perl .. or you can just
call cacls.exe with the system command  .. it's a WinNT utility for change
the ACL (permissions)

-- 
  jason king

  In New York, a fine of $25 can be levied for flirting. This old law
  specifically prohibits men from turning around on any city street and
  looking "at a woman in that way." A second conviction for a crime of
  this magnitude calls for the violating male to be forced to wear a
  "pair of horse-blinders" wherever and whenever he goes outside for a
  stroll. - http://dumblaws.com/

Reply via email to