0

I just noticed that ogr2ogr.exe doesn't seem to work when executed with admin right ..? I tested with the following parameters:

ogr2ogr.exe -f "GeoJSON" "C:\Users\root\Desktop\Plugin_new\Shapefiles_Karte\Landkreise\Bundeslaender.geojson" "C:\Users\root\Desktop\Plugin_new\Shapefiles_Karte\Landkreise\Bundeslaender.shp" -overwrite

I used a cmd started with admin privileges and one without. Both don't give any oputput when executed. Executed without admin rights creates the geojson file. Executed with admin rights does nothing. No output created. No errors ..

Is this a normal thing?

1 Answer 1

1

The admin is another user.

Privileges allow access to system-resources and tasks. They allow you to change time and shutdown and such things. That is needed when programs need to use those functions or alter something system wise like setting path variables or registry entries.

Access rights allow access to objects, like folders and processes. The admin user might not have the same rights. For example to change files.

An example from a different topic:

The admin of a mail server can change nearly everything to a users mail database. But he cannot read the mails. Therefore an instance above the admin is needed(where every reading of user mail is logged and transparent to the user).

On an operating system it is similar, you have several different rights, like owner and system. The admin can give himself those rights usually but may not have them from the beginning. You can check that via the right-click-security tab on the folder where you want to write to or execute the program in.

1
  • The only reason I can imagine is that ogr2ogr can't read the system path's set priviously to find the files needed (GDAL_PATH). But I still think it should work with admin rights. I included ogr in a program and every time I have to run it with reduced rights, because the program calling ogr has admin rights and hands them down to ogr ..
    – Leo.1906
    Jul 18, 2016 at 9:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.