Hi Jody,
I’ll have a look at how I can contribute to the doc. This is however a 
temporary solution as the Windows service method was the easiest way to get 
this up and running quickly.
Having a user to start the service so that GeoServer has access to the network 
folders shared with this one user.. it’s not really a solution. There must be a 
way in Windows to somewhat allow folders access to the service itself rather 
than a particular user (security may be an issue with this).
Having said that, we’ll likely deploy GeoServer as a TomCat servlet (I believe 
this is the preferred options suggested in the documentation) and setup LDAP 
logins (as authentication provider) making use of existing AD groups and all 
that. Am I right to assume GeoServer would see the folders/mapped drives of the 
user logged into it? Even if GeoServer was started as a service (TomCat 
webapp)? In other words, does GeoServer delegate shared folder access to 
Windows through LDAP?
Please note that, although the intention is to couple a database with GeoServer 
(either Oracle or PostgreSQL), I find the use of GeoPackage files on network 
folder a really good addition to GeoServer and invaluable to visualise the 
output of small projects/analyses.
Thanks,
Armando

From: Jody Garnett <jody.garn...@gmail.com>
Sent: 24 April 2024 18:07
To: Armando Forlani <armando.forl...@tfl.gov.uk>
Cc: Andrea Aime <andrea.a...@geosolutionsgroup.com>; 
geoserver-users@lists.sourceforge.net
Subject: Re: invisible mapped/share drives in Store creation

So it was an operating system permission issue? if you have guidance to add to 
the docs it would be appreciated ...

--
Jody Garnett


On Fri, Apr 19, 2024 at 8:20 AM Armando Forlani 
<armando.forl...@tfl.gov.uk<mailto:armando.forl...@tfl.gov.uk>> wrote:
Hi Andrea and Jody,

I RESOLVED my issue taking clues from this
https://superuser.com/questions/1758898/service-is-not-able-to-access-a-network-drive-mapping-despite-running-under-the
..which led to this:
https://learn.microsoft.com/en-us/answers/questions/1168194/how-run-windows-services-as-the-current-user-when
..and tried a few things but essentially the Windows service has to be started 
as the user logging in the machine and has access to the shared folders 
(default is ‘Network Service’):

  1.  Go to the Service console via services.msc
  2.  Locate the GeoServer service
  3.  Set manual start/stop and stop the service
  4.  Properties --> Log On
  5.  Change ‘This account’ value…

     *   Click ‘Browse’ and check only the ‘User’ box in the object type list
     *   Enter ‘<your domain>\<your username>’ in the ‘Enter the object name to 
select’ and validate it by clicking ‘Check Names’
     *   OK

  1.  Start service

Hopefully I was the only one experiencing this issue, but if there are others.. 
this should be of some use.

Thanks,
Armando


Original issue:

I’m creating a new Store using a GeoPackage file as data source (database). It 
works fine with a gpkg file saved locally i.e. anywhere on the C: drive. I’m 
unable to make it work with files stored on a share drive, either the full path 
or a logical drive letter.

file://J:/folder/data.gpkg<file:///J:/folder/data.gpkg>
  Error creating data store, check the parameters. Error message: Unable to 
obtain connection: path to 'J:\folder\data.gpkg': 'J:\' does not exist

file:\\J:\folder\data.gpkg<file:///J:/folder/data.gpkg>
  Error creating data store, check the parameters. Error message: Unable to 
obtain connection: path to 'J:\folder\data.gpkg': 'J:\' does not exist

file:////DOMAIN.LOCAL/SHARED/shared_folder/folder/data.gpkg<file://DOMAIN.LOCAL/SHARED/shared_folder/folder/data.gpkg>
  Error creating data store, check the parameters. Error message: Unable to 
obtain connection: [SQLITE_CANTOPEN] Unable to open the database file (unable 
to open database file)

file:\\\\DOMAIN.LOCAL\SHARED\shared_folder\folder\data.gpkg<file://DOMAIN.LOCAL/SHARED/shared_folder/folder/data.gpkg>
  Error creating data store, check the parameters. Error message: Unable to 
obtain connection: [SQLITE_CANTOPEN] Unable to open the database file (unable 
to open database file)

It is also impossible making use of the ‘Browse…’ link next to the ‘database’ 
edit box. It won’t list any mapped drives in the drop down list. Only ‘Data 
directory’, ‘Home directory’, A:\, ‘OS Disk (C:)’, D:\ are shown.

Moving data locally is not an option.

Running:
Windows 10 Enterprise
VMware Virtual Platform
Eclipse Adoptium: 17.0.10 (OpenJDK 64-Bit Server VM)
GeoServer 2.24.2 as a Windows service

Any help would be really appreciated.

Thanks,
Armando





This message has been scanned for malware by Forcepoint. 
www.forcepoint.com<http://www.forcepoint.com/>
_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
list:
- Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: 
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to