473,385 Members | 1,843 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Setting File Permissions Via ASP

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)
Jul 22 '05 #1
1 3397
"AlunBoyd" <Al******@discussions.microsoft.com> wrote in message
news:5D**********************************@microsof t.com...
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...b;en-us;248187
Jul 22 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Fran Tirimo | last post by:
I am developing a small website using ASP scripts to format data retrieved from an Access database. It will run on a Windows 2003 server supporting FrontPage extensions 2002 hosted by the company...
0
by: Praveen | last post by:
Hello. I am writing some code that accepts a DFS Link and Username and grants that User permissions to the physical directory that the DFS Link corresponds to. I am using the System.Management...
1
by: Bob Sanderson | last post by:
I want to put an Access database back end on a network server so that it can be shared by several users. I plan to use the built-in Access security to set permissions for the database but am...
1
by: CES | last post by:
All, Could someone please point me to a step by step resource on setting up a ..net Web Application on IIS. I'm having a problem setting up IIS to except a new Web Application. I'm deploying...
3
by: Rich Rekos | last post by:
Does anyone know how to set file permissions via asp.net? I have a page that allows me to upload files, but I want to be able to set the permissions on the file after I upload it. Any ideas? ...
2
by: Phil Hey | last post by:
I am trying to set permissions on a folder programmatically, and have success fully used the code below for knowledge base article 266461 : How To: Programmatically Set NTFS File System Folder...
10
by: John Salerno | last post by:
I always read about how you need to set certain file permissions (for cgi files, for example), but it's never been clear to me *how* you do this. I know you can run the line chmod 755...
10
by: Sridhar | last post by:
HI, I am having problems setting up a website so that it will be available only inside the domain. We have three servers. One is iis server and second one is internal server and the third one is...
5
by: daokfella | last post by:
I have a custom web.config section similar to the following: <CustomAuthSettings attr1="" attr2=""> <Locations RedirectUrl="Invalid.aspx"> <add Path="test.aspx" Roles="1,2,3" Permissions="4,5,6"...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.