Opened 13 years ago
Last modified 13 years ago
#3649 new defect
Data pathnames with drive letters do not work
Reported by: | tksprague | Owned by: | sdlime |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | MapServer C Library | Version: | unspecified |
Severity: | normal | Keywords: | drive letter |
Cc: | bfraser@… |
Description
On Windows (using the latest OSGeo4W), I attempted to use data files that are on a mapped network drive. For instance, my .map file had something like this (I tried with both \ and /):
DATA "y:/gtif/my_gtif.tif" TILEINDEX "y:/gtif/my_index.shp"
All of them failed to open the appropriate file. The error message contained the correct entire file name, and the file did exist, and the file did work with a relative pathname when I copied it to an application directory under the OSGeo4W/apps/my_app directory.
I also tried making a local tile index that included the "write_absolute_path" option, and although the shp file appeared to be created correctly, and the full pathname was attempted, it ultimately failed to open the file.
Here's an example from the log file: msDrawMap(): Image Handling Error. Failed to draw layer named 'blah'.; msDrawRaster(): Unable to access file. y:\my_dir\my_gtif.tif using full path y:\my_dir\my_gtif.tif
The filename in question pops up fine if I just use Start->Run... and enter the pathname that is shown in the error message.
I'm sorry if I don't have the Component categorized appropriately... I have not delved into any of the source code since I got a Windows binary distribution (Mapserver 5.6.5)
The web server (IIS, Apache) runs as a different user so it has no clue about how you've assigned the drive letters to remote shared drives. Use UNC paths (
server
share\rest-of-path) and make sure permissions on the file server allow the web server to connect to the share. See the mailing list archive for more info.
We likely should add a note in the TILEINDEX doc...