Print Page | Close Window

WSH: set write permissions in a directory

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=11479
Printed Date: 28 March 2026 at 2:19pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: WSH: set write permissions in a directory
Posted By: pedalcars
Subject: WSH: set write permissions in a directory
Date Posted: 09 August 2004 at 8:25am
I'm using Windows Scripting Host (WSH), called from an ASP file, to create new directories on the server when a visitor signs up for a service:

CODE:
<%
Dim objShell
Set objShell = CreateObject( "Scripting.FileSystemObject" )
objShell.CreateFolder "F:\Webfolder\" & username
objShell.CreateFolder "F:\Webfolder\" & username & "\images"
Set objShell = Nothing
%>

This creates a new folder with the user's name (alpha numeric only permitted) and an "images" subdirectory.

However, these are created as read-only, by default; I want to make the folders writeable as well.

I can't find a WSH method to alter these permissions that I can get to work.

Any suggestions?

Thanks


-------------
http://www.pedalcars.info/ - www.pedalcars.info

The most fun on four wheels




Replies:
Posted By: dpyers
Date Posted: 09 August 2004 at 11:55am

You'll need to create a subdirectory for your user folders that has r/w permissions. Folders created by the FSO inherit the permissions of their parent folders, and you probably don't want your web root folder to be r/w.

Check out the forum/functions/functions_upload.asp file used by wwf. It has a routine to create user folders, but first the folder holding the user folders had to be created and r/w permission given to IUSR_.



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

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



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