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!

Unable to copy files from mapped network drives

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Using apache 1.13.14 with php4 latest revison on win nt 4.0
the following segment of code in php works on a php coder:-
$file1="i:/ate/util/$date_str.ut6";
if(copy($file1, "d:/temp/file1")==FALSE) die ("Can NOT gain access to remote tester file system 1 ");

D drive in local and I is mapped remote drive.
However in internet explorer 4.0 running apahe gives this error:-
Warning: Unable to open 'i:/ate/util/011100.ut6' for reading: Permission denied in d:\Apache Group\Apache\htdocs/myindex.php on line 32
Can NOT gain access to remote tester file system 1
Apache can not gain access to any of my mapped drives.
Any ideas ??
 
Well Im not that familiar with the Win32 version of apache, so Im not sure exactly what the deal is, but here are some suggestions:

When you run PHP code through apache, it runs as the anonymous internet user. On Linux this is normally the user 'nobody' or 'httpd'.

Im not sure on NT, but it is probably the IUSR_Machine_Name user that the script executes as. So you will need to make sure that the IUSR_Machine_Name user has read permissions to your mapped drive. If the mapped drive is on another NT machine, you might need to create a user on that machine with the same name as the IUSR_Machine_Name on the apache server.

So if the name of the computer that your apache server is running on is "APACHESERVER" for instance, you will need to create a user on the machine that the mapped drive resides named "IUSR_APACHESERVER" and then give read permissions to that user for the drive that you have mapped.

Like I said Im not sure about the username. That is the username that IIS runs as on NT, but it may be different for Apache.

And then there is always the possibility that I am completely off base here, and should be thoroughly ignored as a microsoft skeptic. heh. believe me at your own risk. (or better yet... GO LINUX... :) )



Regards,
Gerald
 
The I drive is a directory that maps to another NT 4 workstation.

In linux I can set up links to other directories.
In PWS /IIS I can setup virtual directories to other NT workstations.

How can I do this with Apache, shortcuts from the Apache root directory to other directories (I: drive) does not seem to work ?

 
IIS and Apache are entirely different animals.

IIS can use different usernames if the anonymous user is denied. Apache does not have that functionality that I know of.

Look in your httpd.conf file and look for the User directive and see what user the web server is running as and make sure that user has permissions to read the mapped drive.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top