Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - WSH: set write permissions in a directory
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

WSH: set write permissions in a directory

 Post Reply Post Reply
Author
pedalcars View Drop Down
Senior Member
Senior Member


Joined: 12 August 2002
Location: United Kingdom
Status: Offline
Points: 268
Post Options Post Options   Thanks (0) Thanks(0)   Quote pedalcars Quote  Post ReplyReply Direct Link To This Post Topic: WSH: set write permissions in a directory
    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
www.pedalcars.info

The most fun on four wheels

Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.