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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Permission on the web server

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I wrote a script that uses a results file (text file). It worked locally on my NT workstation but after I uploaded it (html file and script) to the web server it keeps giving me permissions error on the server. The administrator has taken many weeks and still has not figured out why I get this error.

I tried using a document file and I still get same permissions issue. Please adivse.
 
You need to make sure that the IUSR_<SERVERNAME> has permissions to read the contents of the directory you're looking to write/read/append the file in. Without these permissions, you will not be allowed to access that directory.
 


Is the IUSR_MYSERVERNAME what I would tell my administrator to check?
Is the [tt]IUSR[/tt] the same name for all NT servers?
 
A couple of common problems....

1 - the style of line ending is different for Win OS boxes and *nix OS boxes. If you are writing your code on a Win box, and then moving it to a *nix box, you MUST convert the line endings to *nix style. Most gui ftp clients will have a little checkbox or other switch to do this on the fly with the upload. Alternatively, if you can get to a command prompt on the *nix box, you can use the dos2unix utility.

2 - Where Win OSs use the file extension to determine whether or not it is executable (.exe, .bat, etc.), *nix OSs use a set of 'permissions' to tell whether a file is executable. When you move a file from a Win box to a *nix box, you must tell the *nix box that the file is executable. Again, most gui ftp clients can do this with the upload. Or, you'll need to do it from the command line.

3 - You might be making use of a Win OS specific utility that does not exist on the server. Make sure all your code really is portable.

'hope this helps

If you are new to Tek-Tips, please use descriptive titles, check the FAQs, and beware the evil typo.
 
thanks for your info...This was created on an NT and I uploaded it to an NT server.

 
IUSR is the same as Nobody on *nix servers, but the IUSR name changes depending on the name of the server in question.

For instance, if I have an NT server that is used as a web server with it's name being HAMMERSTEIN, the only way that the CGI scripts could write files to the directory d:/webdb/temp/ is if that directory had full access privledges set for IUSR_HAMMERSTEIN. If these permissions have not been set, then it would cause you to get the errors you currently are receiving.

- Rieekan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top