Connecting Tech Pros Worldwide Forums | Help | Site Map

Setting File Permissions Via ASP

AlunBoyd
Guest
 
Posts: n/a
#1: Jul 22 '05
Quick Question. Is it possiable via a ASP to set (NTFS) permissions on files
not on the IIS server?

I'm sticking together an ASP to create our new user Home/Profile dir file
structure. The script is running in anonymous user mode using an account
which has full perm on the file severers.

It's creating the file structure OK, but when it comes to the file
permissions, CALCS direct or CACLS in a .CMD doesn't appear to be able to set
ther permissions when invoked from the ASP. It does however work for the user
when logged on the server's local console.

----
Alun Boyd (UK)

Tom Kaminski [MVP]
Guest
 
Posts: n/a
#2: Jul 22 '05

re: Setting File Permissions Via ASP


"AlunBoyd" <AlunBoyd@discussions.microsoft.com> wrote in message
news:5D58C243-173F-43B6-A5C5-BA2BB1B0FB78@microsoft.com...[color=blue]
> Quick Question. Is it possiable via a ASP to set (NTFS) permissions on[/color]
files[color=blue]
> not on the IIS server?
>
> I'm sticking together an ASP to create our new user Home/Profile dir file
> structure. The script is running in anonymous user mode using an account
> which has full perm on the file severers.
>
> It's creating the file structure OK, but when it comes to the file
> permissions, CALCS direct or CACLS in a .CMD doesn't appear to be able to[/color]
set[color=blue]
> ther permissions when invoked from the ASP. It does however work for the[/color]
user[color=blue]
> when logged on the server's local console.[/color]

It's probably failing from ASP because of permissions. Try this technique
to execute the code under the context of a user that has permissions to
change permissions:

How to impersonate a user from Active Server Pages
http://support.microsoft.com/default...b;en-us;248187


Closed Thread