Print Page | Close Window

FileSystemObject & Security

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=11930
Printed Date: 31 March 2026 at 4:48am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: FileSystemObject & Security
Posted By: Gary
Subject: FileSystemObject & Security
Date Posted: 24 September 2004 at 9:26am

I have an asp intranet based site that creates csv files in a subfolder. Domain user 'Gary' goes to a page on the site and requests the creation of a csv extract. The SQL data is then passed into a newly created .csv file by the FSO.

My question is regarding security:
What account is the creator of the file (domain user or the server's IUSR_ServerName)? Also, the user can then open/download the file via an <a href="folder/file.csv>. Again, when the user clicks on the link, which account will be used to open the file - 'Gary' or IUSR ???

Thanks




Replies:
Posted By: michael
Date Posted: 24 September 2004 at 10:41am
IUSR_Machinename for both unless you have Windows Authentication enabled (Anonymous turned off)

-------------
http://baumannphoto.com" rel="nofollow - Blog | http://mpgtracker.com" rel="nofollow - MPG Tracker


Posted By: Gary
Date Posted: 24 September 2004 at 10:53am

Thanks for that Michael....

Problem is that the site relies upon Windows Authentication with Anon disabled.

Before the FSO creates the file, it checks to see if the user folder exists within an 'Excel' folder (eg Excel/Gary) . If it is not there, then it will create the folder (FSO.CreateFolder) and then place the csv in there. I need to be able to set the security on the user folder so that only the user, Gary, can access the contents.

Is this possible ???

Cheers



Posted By: Mart
Date Posted: 24 September 2004 at 11:26am
Yes it is possible, sub directories inherit the permissions of the parent folder so if you create a folder called "GaryOnly" with the permissions set to only allow him to use it when you create a sub directory in there the  sub directories permissions will be the same


Posted By: Gary
Date Posted: 24 September 2004 at 11:39am

Is there no automated way of creating the username folder as we are constantly adding users to the system (via a web page) and we dont want to have to then manually create the user folder and apply the appropriate permissions.

Also, just because we create a new system user, this does not necessarily mean that the user will be creating csv files. The username folder is only created when it is required.

Well, looks like I'm not going to be able to exactly what I want to, unless you guys have any more suggestions. (can FSO manage folder permissions ???)

Thanks Guys



Posted By: dpyers
Date Posted: 24 September 2004 at 5:54pm
Just out of curiousity, most csv's I create are done on the fly - do you need to create them before they're needed?

-------------

Lead me not into temptation... I know the short cut, follow me.


Posted By: Gary
Date Posted: 27 September 2004 at 4:16am

The csv's are created on the fly (as and when requested by the user).

With this in mind, my problem is securing those files so that only the user who requested their creation is able to view them. Sure, this could be done manually, but I'd rather not do that.




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net