Solved

Setting Permissions with ASP

Posted on 1999-01-04
3
203 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Read about why website design really matters in today's demanding market.
Get to know the ins and outs of building a web-based ERP system for your enterprise. Development timeline, technology, and costs outlined.
This video teaches users how to migrate an existing Wordpress website to a new domain.
The viewer will learn how to dynamically set the form action using jQuery.

910 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now