From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tremer <michael.tremer@ipfire.org> To: development@lists.ipfire.org Subject: Re: [PATCH] tor: Fix tor permissions if presant via update.sh Date: Mon, 10 Jun 2019 19:51:06 +0100 Message-ID: <45B7E08D-B308-46DD-9C85-1CCC8E55B173@ipfire.org> In-Reply-To: <4e444646-a57f-1998-56ca-83c350d4b8ca@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2117772673036892766==" List-Id: <development.lists.ipfire.org> --===============2117772673036892766== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi, Yes that will be it. The backup stores permissions and ownership. Please move the chown line to after the backup is being restored and you will= be fine. -Michael > On 10 Jun 2019, at 19:36, Paul Simmons <mbatranch(a)gmail.com> wrote: >=20 > On 6/10/19 1:12 PM, Peter M=C3=BCller wrote: >> Hello Michael, >>=20 >> as mentioned in https://bugzilla.ipfire.org/show_bug.cgi?id=3D12088#c11 , >> the "install.sh" script of the Tor addon contains all required steps. >>=20 >> Since "update.sh" calls "install.sh" at the end of the file, everything >> should be fine after an update as well - which is not. However, due to >> this, I do not think putting it into "update.sh" makes sense either. >>=20 >> Thanks, and best regards, >> Peter M=C3=BCller >>=20 >> Michael Tremer: >>> Hi, >>>=20 >>> Thanks for sending in that patch. >>>=20 >>> But I think instead of doing this in the Core Update, this change should = be applied in the tor update scripts. >>>=20 >>> -Michael >>>=20 >>>> On 10 Jun 2019, at 12:36, Erik Kapfer <ummeegge(a)ipfire.org> wrote: >>>>=20 >>>> Signed-off-by: Erik Kapfer <ummeegge(a)ipfire.org> >>>> --- >>>> config/rootfiles/core/133/update.sh | 5 +++++ >>>> 1 file changed, 5 insertions(+) >>>>=20 >>>> diff --git a/config/rootfiles/core/133/update.sh b/config/rootfiles/core= /133/update.sh >>>> index a05ad0741..3ecb5651b 100644 >>>> --- a/config/rootfiles/core/133/update.sh >>>> +++ b/config/rootfiles/core/133/update.sh >>>> @@ -71,6 +71,11 @@ sudo -u nobody /srv/web/ipfire/cgi-bin/vpnmain.cgi >>>> /etc/init.d/squid start >>>> /etc/init.d/collectd restart >>>>=20 >>>> +# Set new permissions for tor >>>> +if [ -d "/var/lib/tor" ]; then >>>> + chown -R tor:tor /var/lib/tor >>>> +fi >>>> + >>>> # Finish >>>> /etc/init.d/fireinfo start >>>> sendprofile >>>> --=20 >>>> 2.12.2 >>>>=20 >>>=20 >>=20 >=20 > Perhaps the restore_backup in install.sh is undoing the ownership? >=20 > p. --===============2117772673036892766==--