osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ggsn/+/36841?usp=email )
Change subject: doc: set state-dir to /var/lib/osmocom/osmo-ggsn ......................................................................
doc: set state-dir to /var/lib/osmocom/osmo-ggsn
Prepare to run osmo-ggsn as user with the systemd service. As with other Osmocom service files, we will set StateDirectory= and WorkingDirectory= options. This results in osmo-ggsn only being able to write to /var/lib/osmocom, therefore let's change the state-dir from /tmp to /var/lib/osmocom/osmo-ggsn to avoid:
gsn.c:411 fopen(path=/tmp/gsn_restart, mode=w) failed: Error = Permission denied
Having the state in /var/lib/osmocom also makes more sense, because then it doesn't get deleted on reboot.
Change-Id: I5b51529b4f8bd2462e54f58a1ce2e2d7c76ff46a --- M doc/examples/osmo-ggsn-kernel-gtp.cfg M doc/examples/osmo-ggsn.cfg M doc/manuals/chapters/configuration.adoc 3 files changed, 24 insertions(+), 4 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/41/36841/1
diff --git a/doc/examples/osmo-ggsn-kernel-gtp.cfg b/doc/examples/osmo-ggsn-kernel-gtp.cfg index 28eb207..12da4f8 100644 --- a/doc/examples/osmo-ggsn-kernel-gtp.cfg +++ b/doc/examples/osmo-ggsn-kernel-gtp.cfg @@ -36,7 +36,7 @@ no login ! ggsn ggsn0 - gtp state-dir /tmp + gtp state-dir /var/lib/osmocom/osmo-ggsn gtp bind-ip 127.0.0.2 apn internet gtpu-mode kernel-gtp diff --git a/doc/examples/osmo-ggsn.cfg b/doc/examples/osmo-ggsn.cfg index 02523e9..76fa257 100644 --- a/doc/examples/osmo-ggsn.cfg +++ b/doc/examples/osmo-ggsn.cfg @@ -36,7 +36,7 @@ no login ! ggsn ggsn0 - gtp state-dir /tmp + gtp state-dir /var/lib/osmocom/osmo-ggsn gtp bind-ip 127.0.0.2 apn internet gtpu-mode tun diff --git a/doc/manuals/chapters/configuration.adoc b/doc/manuals/chapters/configuration.adoc index 5314d10..f0889d3 100644 --- a/doc/manuals/chapters/configuration.adoc +++ b/doc/manuals/chapters/configuration.adoc @@ -16,7 +16,7 @@ .Example: Single GGSN configuration section ---- ggsn ggsn0 - gtp state-dir /tmp + gtp state-dir /var/lib/osmocom/osmo-ggsn gtp bind-ip 127.0.0.6 apn internet gtpu-mode tun @@ -58,7 +58,7 @@ for every GGSN instance:
---- -OsmoGGSN(config-ggsn)# gtp state-dir /var/lib/ggsn/ggsn0 <1> +OsmoGGSN(config-ggsn)# gtp state-dir /var/lib/osmocom/osmo-ggsn <1> OsmoGGSN(config-ggsn)# gtp bind-ip 127.0.0.6 <2> ---- <1> Store the GSN restart state in the specified directory