[Live-demo] Permissions problems with GeoServer

Ben Caradoc-Davies ben at transient.nz
Tue Dec 6 10:41:53 PST 2016


Angelos,

I have just found the answer to that too: install_cartaro.sh ran last in 
inchroot.sh, also started GeoServer, then reset all the GeoServer 
permissions, in effect cleaning up after install_geonode.sh. The 
retirement of Cartaro from OSGeo Live breaks GeoServer. I will add a 
cleanup step to install_geonode.sh:


 From bin/retired/install_cartaro.sh:

############################################
# Bring down GeoServer and reset permissions
############################################

"$GEO_PATH"/bin/shutdown.sh &> /dev/null &
sleep 30

## Allow the user to write in the GeoServer data dir
adduser "$USER_NAME" users
chmod -R g+w "$GEO_PATH/data_dir"
chmod -R g+w "$GEO_PATH/logs"
chgrp -R users "$GEO_PATH/data_dir"
chgrp -R users "$GEO_PATH/logs"


Kind regards,
Ben.


On 06/12/16 23:02, Angelos Tzotsos wrote:
> Hi Ben,
>
> I saw the same issue in nightly build5.
> I am wondering why geoserver has this permission issue, previous
> versions used to work fine with this setup.
>
> Best,
> Angelos
>
> On 12/06/2016 05:10 AM, Ben Caradoc-Davies wrote:
>> Angelos,
>>
>> even with my most recent fixes
>> <https://github.com/bencaradocdavies/OSGeoLive/tree/upgrade-geoserver>, GeoServer
>> on a nightly build will still not start.
>>
>> Looks to me like permissions problems (files and directories in the
>> data directory whcih are owned by root). Likely culprit is
>> install_geonode.sh, which starts GeoServer as root "to update layers
>> in the geonode db", causing the creation of files and directories
>> owned by root:root. The solution (in install_geonode.sh) might be
>> something like:
>>
>> su -c "$GEOSERVER_PATH/bin/startup.sh" - user
>>
>> but it will take a little fiddling to get this working with
>> redirection and running in the background. I will let you know when I
>> have a fix.
>>
>> Kind regards,
>>
>
>

-- 
Ben Caradoc-Davies <ben at transient.nz>
Director
Transient Software Limited <http://transient.nz/>
New Zealand



More information about the Osgeolive mailing list