Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Writing to a txt file

Status
Not open for further replies.

rshandy

Technical User
Dec 26, 2003
91
US
We're using IIS 5.0 server to run Perl applications for our internal company functions. The applications reside in the default scripts folder. This problem may straddle both Perl and IIS forums, but here goes:

When the Perl program is accessed from a browser:
It can write to a file on another computer in the network, but will not write to a file on the iis server unless it resides/created in the defaults scripts folder.

However,when I execute the program from a Perl editor or the command line, it will write to any desired folder on the IIS server.

I'm sure its just a permissions issue, but I can't seem to locate the problem.
Any ideas.

Thanks,Rich
 
I'm not sure about Perl, but with VBScript based ASP, by default scripts requested over HTTP are executed in the security context of a local account named IUSR_TheNameOfYourComputer and that particular account has very few privilages..
 
Is there a way to configure it differently so the user can have more read/write permissions. What kind of permissions would I have in a cgi-bin folder instead? The windows2000 member of the domain must be able to run the Perl script from their browser - that script must be able to create/edit files within the iis server(or folders) and then ftp them to a remote server. How can I get a user requesting files through HTTP perform those tasks?
 
Yes you can give the default account more privilages but it just starts out assuming you need only the bare minimum.

I guess the idea is that you'll know if you need more but you wouldn't necessarily know if you had too much.

Also, and remember I'm speaking from an ASP perspective, but if you go into the IIS Admin from Control Panel -> Administrative Tools you can change the default account or even completely disable anonymous access.

When anonymous access is disabled, IIS will return a permission denied/authentication required message to the browser. If the user is logged into your domain and is using Internet Explorer then the browser will automatically send domain credentials to IIS. If validated then IIS will execute scripts and browse folders in the security context of the specific user.
 
Thanks Sheco. Do I access through the IIS Manager? I see it lists the default and adminstrative websites, but I don't see where I can change the default account...
 
Right-click to get the properties of a folder on the right side of the screen and it will show a tabbed dialog box... one of the tabs will be "Directory Security" or somesuch and there is a button to configure the type of access.

Remember that this is IIS security and that if you remove the anonymous acccess then any user will have access via their own credentials so the individual will need ActiveDirectory (NT) permission to the various files and folders.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top