Setting File Permissions Via ASP

A

AlunBoyd

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.
 
T

Tom Kaminski [MVP]

AlunBoyd said:
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.

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.aspx?scid=kb;en-us;248187
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,128
Latest member
ElwoodPhil
Top