Solved

Setting Permissions with ASP

Posted on 1999-01-04
3
208 Views
Last Modified: 2013-12-25
Is it possible to change permission on files and folders with ASP? F.i. let a cerain user have read access and another full control?
0
Comment
Question by:MHQ
  • 2
3 Comments
 

Accepted Solution

by:
jdsweet earned 50 total points
ID: 1857598
Technically, this is possible. However, there are two very different approaches to do this.

A) Innate WinNT permissions.
You are using NT security on your machine, which means the server knows which user is coming in based on a login when they first hit your secured site.  In this case, you can just use Front Page or InterDev (Project -> Web Project -> Web Permissions) to secure individual pages based on NT User and Group accounts.

A slight variant on this is Site Server's P&M capabilities, but you can only do this if you're using Site Server.

Advantage: easy start-up, easy to maintain
Disadvantage: requires clients to be using IE browser and have an actual account on your domain, but Site Server P&M gets around these disadvantage

B) Database security
This is the more common way of doing things, since it doesn't require giving random web users some account on your domain, however limited.

In this case you somehow create a user_id and password for users, store it in a database yourself, and then authenticate the user through custom ASP scripts.  Usually, this involves authenticating the user once, and then checking on each page whether the current user has access to the current content.  Of course, you have to go and create a lookup table in your database that lists which users have access to which pages.  This is definitely a more complicated option, and requires programmers to design and implement.  It's also technically less secure than the other option, since user names and passwords are flying over the Internet in cleartext, unless you have an SSL secured web server.
0
 
LVL 3

Author Comment

by:MHQ
ID: 1857599
What I mean is that I want to set the permissions on a library directly from the ASP code. Add/remove users that exists in my domain. (It's a local intranet so evryone exists in the NT-server. I know what you mean about setting permissions using the web permissions, the question is, can I do this from ASP code?
0
 

Expert Comment

by:jdsweet
ID: 1857600
Yes, you can, but only with Site Server P&M, as I understand it.  This may change with the release of NT 5.0, because only then will the underlying OS fully support the Active Directory Services (ADS) that you apparently need.  ADS provides a much simpler hook into all sorts of things, but particularly the security mechanisms you want.  

Site Server P&M is what actually provides the Automation interface (which an interpreted language like ASP requires) you need. Without P&M (or something similar, I don't know of anything else) you're only option is to write some sort of component that provides a wrapper to the native OS calls you'll need to make, install that component on every server.  That's *exactly* what P&M provides.  P&M comes as part of Site Server 3.0 Standard -- much cheaper than Site Server Commerce which runs into the thousands...
0

Featured Post

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Color can increase conversions, create feelings of warmth or even incite people to get behind a cause. If you want your website to really impact site visitors, then it is vital to consider the impact color has on them.
There’s a good reason for why it’s called a homepage – it closely resembles that of a physical house and the only real difference is that it’s online. Your website’s homepage is where people come to visit you. It’s the family room of your website wh…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question