CreateFolder across network

J

Jessard

Hi all,

This seems like a really simple question but I don't think there is a simple
answer. If there is I'd be glad to hear it. I am trying to create a folder,
yep, that's all. I can do it with a vbscript but as soon as I put it in an
asp page and load the page I get an error 500 message. Basically, I am
using...

if (not fso.FolderExists("\\ServerName\Clients\c_" &
request.Querystring(i))) then
fso.CreateFolder("\\ServerName\Clients\c" & request.Querystring(i))
end if

Don't worry about the request.Querystring(i) - it's valid. The script fails
on the fso.CreateFolder line so it gets in the if.

If I change the path to a local server folder then the script works. It has
something to do with the permissions at the server I am placing the folder
at. I check the parent folder permissions where I want to create a new
folder under. It has "Everyone" full access - all boxes ticked. Both
computers, the webserver and the server where the folder is to be created are
on the same domain and can be manually sought out, and a folder created, via
my network places. I am told I need the IUSR account of my webserver added
to the parent folder permissions on the other machine. Is this right?

Can somebody work me through what I can do here?

Thanks,
Jesse
 
J

Jeff Cochran

Hi all,

This seems like a really simple question but I don't think there is a simple
answer. If there is I'd be glad to hear it. I am trying to create a folder,
yep, that's all. I can do it with a vbscript but as soon as I put it in an
asp page and load the page I get an error 500 message.

First, the 500 error:

http://www.aspfaq.com/show.asp?id=2109

As for why it works in VBScript and not ASP:

In VBScript you're running as the logged in user. In ASP you're
running as whatever user is defined for ASP access, often the
anonymous user. The permissions for one aren't the same as the other.
If I change the path to a local server folder then the script works. It has
something to do with the permissions at the server I am placing the folder
at. I check the parent folder permissions where I want to create a new
folder under. It has "Everyone" full access - all boxes ticked.

Lesson 3: "Everyone" is a group, not "every account on the system".
Just because the group "Everyone" has access deosn't mean a user has
access. The account has to be in the "everyone" group, and by
default, the IIS anonymous user isn't (for security reasons).
Both
computers, the webserver and the server where the folder is to be created are
on the same domain and can be manually sought out, and a folder created, via
my network places.

Lesson 4: The Anonymous user is local account, not a domain account.
Domain permissions are meaningless unless you configure the account to
be a domain account (not recommended) or sepcifically grant it access
on the destination system.
I am told I need the IUSR account of my webserver added
to the parent folder permissions on the other machine. Is this right?

No. The account trying to create the folder, most likely the
anonymous account, needs the permission to create a folder on the
destination system in the destination folder. Subtle, but there's a
difference.
Can somebody work me through what I can do here?

Give the IUSR account from the IIS system at least MODIFY permission
on the destnation server's folder.

Jeff
 
J

Jessard

Thanks Jeff and Curt,

So I goto the folder on the destination machine, security. I click add but
I cannot see the IUSR account of the webserver machine. Firstly, is this
what you meant? If so, what needs to be done to make it visible?

Jesse
 
J

Jeff Cochran

So on the webserver or the destination folder machine?

Destination. The problem is since it's a local account you can't just
add the account, you need to specify the system as well. I don't
remember your exact setup but it's often easiest to create a local
group and add the account to it.

Jeff
 
J

Jessard

Ok, I went to the destination machine and added a group called muffetusr.
However, when I goto add a member to this group I am not able to find through
any of the drop-down lists the iusr_muffet account.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,816
Latest member
SapanaCarpetStudio

Latest Threads

Top