#2253 closed defect (fixed)
Better i/o error reporting for ogr utilities when lacking read permissions.
Reported by: | springmeyer | Owned by: | warmerdam |
---|---|---|---|
Priority: | lowest | Milestone: | 2.2.0 |
Component: | default | Version: | 1.5.0 |
Severity: | minor | Keywords: | Error reporting, Permissions, Read access |
Cc: |
Description
Improved error reporting when ogr cannot open a file for read access would improve overall user experience.
For example a rare case where this would be useful is when using ogrinfo to query a file where the user does not have read permissions.
If the user does not have read permissions on a dataset ogrinfo currently only returns:
FAILURE: Unable to open datasource '/path/to/fn.shp' with the following drivers ...
If the problem is read permission a more explicit error would be useful.
This is a potential use case for PostGIS users when running as the postgres user to load data into a postgres database. If they attempt to call ogrinfo on a file and their postgres user does not have read permissions a more explicit error would remind them of the problem.
This is a very minor issue but would improve the ogr utility.
Change History (7)
comment:1 by , 17 years ago
comment:2 by , 16 years ago
Milestone: | 1.6.0 |
---|
comment:6 by , 8 years ago
Milestone: | → 2.2.0 |
---|
I also noticed, just now using the new KML driver, that when ogr2ogr tries to write to a filename that already exists as a folder, it will simply return:
It makes sense that the ogr2ogr drive cannot overwrite a folder with a file, but it would be great to make this error message more explicit.