From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter =?utf-8?q?M=C3=BCller?= To: development@lists.ipfire.org Subject: [PATCH] ensure Tor daemon files have correct permissions Date: Fri, 15 Mar 2019 17:00:00 +0000 Message-ID: In-Reply-To: <2273FCAB-AAC1-4ABC-B851-FD34460F2269@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5460691182027099073==" List-Id: --===============5460691182027099073== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Set permissions for /var/lib/tor and /var/ipfire/tor to tor:tor, regardless whether Tor user has been created before or not. This ensures Tor starts properly on existing systems after reinstallation of the add-on. Thanks to Michael for the hint. Further, a comment for new Tor user in /etc/passwd has been added. Fixes #11779. Signed-off-by: Peter M=C3=BCller --- src/paks/tor/install.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/paks/tor/install.sh b/src/paks/tor/install.sh index e1ed33331..268bccecd 100644 --- a/src/paks/tor/install.sh +++ b/src/paks/tor/install.sh @@ -29,12 +29,12 @@ if ! getent group tor &>/dev/null; then fi =20 if ! getent passwd tor; then - useradd -u 119 -g tor -d /var/empty -s /bin/false tor - - # Adjust some folder permission for new UID/GID - chown -R tor:tor /var/lib/tor /var/ipfire/tor + useradd -u 119 -g tor -c "Tor daemon user" -d /var/empty -s /bin/fals= e tor fi =20 +# Adjust some folder permission for new UID/GID +chown -R tor:tor /var/lib/tor /var/ipfire/tor + extract_files restore_backup ${NAME} start_service --background ${NAME} --=20 2.16.4 --===============5460691182027099073==--