Solved

Setting Permissions with ASP

Posted on 1999-01-04
3
198 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
Comment Utility
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
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Both Easy and Powerful How easy is PHP? http://lmgtfy.com?q=how+easy+is+php (http://lmgtfy.com?q=how+easy+is+php)  Very easy.  It has been described as "a programming language even my grandmother can use." How powerful is PHP?  http://en.wikiped…
Envision that you are chipping away at another e-business site with a team of pundit developers and designers. Everything seems, by all accounts, to be going easily.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
This video teaches users how to migrate an existing Wordpress website to a new domain.

763 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

9 Experts available now in Live!

Get 1:1 Help Now