make user running script not ASPNET?

theath

New member
Joined
Jul 14, 2003
Messages
2
Location
Lubbock, Texas
hi -

I have an ASP script w/ VB behind it that recursively scans directories and puts them in a tree so that people will be able to browse remote disks over the web. The plan was that we would let NTFS permissions handle themselves and that the folders that didnt belong to people wouldnt show up (which works, kinda.)

So I have it required that people login to the website, but the user running the program is always ASPNET. This is a problem, because if its always ASPNET, permissions for files are going to be the same for everyone.

I know in *nix you can use some system calls to setUID to whatever user you want (granted the executable has been given authority), but I dont know of anything like that in windows.

I can fetch the users name using: Request.ServerVariables("AUTH_USER"), and it shows the right user, but it doesnt change the user behind the running program.

The tree Im using comes from microsoft and is created by an XML string. I think I could break the program up to one that generates the XML and the other that reads it quite easily, and then all Id need to do is:
a) figure out how to call another program inside vb.net
b) set the UID to run the program as the user who logged in
c) run it.

If anyone has any words of wisdom Id really appreciate them. Ive been looking all over the web and havent found much. Ive looked into checking file permissions and ownership manually, but I think the solution Im going for now is much more sound, not to mention a lot easier ;)

thanks!
terry heath
 
Back
Top