From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-lj1-f178.google.com ([209.85.208.178]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1gwTou-00067s-1i for ptxdist@pengutronix.de; Wed, 20 Feb 2019 16:30:00 +0100 Received: by mail-lj1-f178.google.com with SMTP id g11-v6so21172096ljk.3 for ; Wed, 20 Feb 2019 07:29:59 -0800 (PST) MIME-Version: 1.0 References: <28b3d3f0-8281-64e5-ae67-2b43b49348b6@mev.co.uk> <20190220144202.pilz3kgql5k3hqz5@pengutronix.de> <20190220152020.b5bpa2k7ip65jyeq@pengutronix.de> In-Reply-To: <20190220152020.b5bpa2k7ip65jyeq@pengutronix.de> From: Jon Ringle Date: Wed, 20 Feb 2019 10:29:45 -0500 Message-ID: Subject: Re: [ptxdist] strange permission behavior List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Content-Type: multipart/mixed; boundary="===============1986354890==" Errors-To: ptxdist-bounces@pengutronix.de Sender: "ptxdist" To: ptxdist@pengutronix.de --===============1986354890== Content-Type: multipart/alternative; boundary="000000000000bd9a3905825507ab" --000000000000bd9a3905825507ab Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Feb 20, 2019 at 10:20 AM Michael Olbrich wrote: > On Wed, Feb 20, 2019 at 10:10:01AM -0500, Jon Ringle wrote: > > On Wed, Feb 20, 2019 at 9:42 AM Michael Olbrich < > m.olbrich@pengutronix.de> > > wrote: > > > On Wed, Feb 20, 2019 at 09:09:18AM -0500, Jon Ringle wrote: > > > > On Wed, Feb 20, 2019 at 8:22 AM Ian Abbott > wrote: > > > > > > > > > On 20/02/2019 13:17, Ian Abbott wrote: > > > > > > On 20/02/2019 00:59, Jon Ringle wrote: > > > > > >> I've got a strange permission problem when I build on our buil= d > > > server > > > > > >> that was recently updated from Ubuntu-14.04 to Ubuntu-16.04. > > > > > >> > > > > > >> On our Ubuntu-16.04 server, on most of the platform/packages/ > > > > > >> subdirectories the packages are getting created with other > having no > > > > > >> permissions at all: > > > > > >> > > > > > >> rootfs/platform-ec1c/packages$ tree -d -L 1 -p > > > > > >> . > > > > > >> =E2=94=9C=E2=94=80=E2=94=80 [drwxr-x---] attr-2.4.47 > > > > > >> =E2=94=9C=E2=94=80=E2=94=80 [drwxr-x---] avahi-0.7 > > > > > >> =E2=94=9C=E2=94=80=E2=94=80 [drwxr-x---] bash-4.3.30 > > > > > >> =E2=94=9C=E2=94=80=E2=94=80 [drwxr-x---] boost_1_67_0 > > > > > >> =E2=94=9C=E2=94=80=E2=94=80 [drwxr-x---] busybox-1.29.3 > > > > > >> =E2=94=9C=E2=94=80=E2=94=80 [drwxr-x---] coreutils-8.29 > > > > > >> ... > > > > > >> > > > > > >> This results in all files contained within those directories t= o > also > > > > > >> have no perms for other, and get installed on my target in the > same > > > > > >> way. This in turn then causes permission problems to occur. > > > > > >> > > > > > >> I'm at a loss as to what to look for to resolve this problem. > > > > > >> > > > > > >> Suggestions? > > > > > > > > > > > > I think you are building with umask 0027, so files are created > with > > > no > > > > > > permissions for 'other' users. This should not affect the > contents > > > of > > > > > > the platform-ec1c/packages/*.ipk files, or the contents of the > > > > > > platform-ec1c/root/ directory, or the contents of the > > > > > > platform-ec1c/images/root.* images, which should all contain > files > > > with > > > > > > the correct permissions for the target. > > > > > > > > > > Correction: The platform-ec1c/root/ directory contents do not hav= e > the > > > > > correct ownership for the target, but the file mode bits should b= e > > > correct. > > > > > > > > > > > > > > I also thought that perhaps it was a umask issue, but as you can se= e > > > below, > > > > umask is 0022, which should be ok. > > > > The permission problem that I am having on the target is that > > > > systemd-networkd.service won't start because it can't read the > > > > configuration files below. These files are installed in systemd.mak= e > via: > > > > > > > > ifdef PTXCONF_SYSTEMD_NETWORK > > > > @$(call install_tree, systemd, 0, 0, -, > /usr/lib/systemd/network) > > > > @$(call install_alternative_tree, systemd, 0, 0, > > > > /usr/lib/systemd/network) > > Another idea: This is in ptxdist or your BSP. What are the files > permissions there? > > My BSP doesn't have the directory, projectroot/usr/lib/systemd/network/ ptxdist projectroot is providing eth0.network, that has the correct permissions. jringle@dev-atl-bamb01:/usr/local/lib/ptxdist-2019.01.0_GP/projectroot/usr/= lib/systemd/network$ ll total 12 drwxr-xr-x 2 root root 4096 Feb 12 05:18 ./ drwxr-xr-x 4 root root 4096 Feb 12 05:18 ../ -rw-r--r-- 1 root root 70 Feb 12 05:18 eth0.network The 80-container-*.network files that have the wrong permissions are coming from the install_tree, not the install_alternative_tree, which is provided by the systemd itself: jringle@dev-atl-bamb01:/srv/gpec-build/rootfs/platform-ec1c/packages/temp/d= ata/usr/lib/systemd/network$ ll total 28 drwxr-xr-x 2 jringle domain^users 4096 Jan 1 00:00 ./ drwxr-xr-x 5 jringle domain^users 4096 Jan 1 00:00 ../ -rw-r----- 1 jringle domain^users 645 Jan 1 00:00 80-container-host0.network -rw-r----- 1 jringle domain^users 718 Jan 1 00:00 80-container-ve.network -rw-r----- 1 jringle domain^users 704 Jan 1 00:00 80-container-vz.network -rw-r--r-- 1 jringle domain^users 412 Jan 1 00:00 99-default.link -rw-r--r-- 1 jringle domain^users 70 Jan 1 00:00 eth0.network --000000000000bd9a3905825507ab Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Wed, Feb 20, 2019 at = 10:20 AM Michael Olbrich <m.= olbrich@pengutronix.de> wrote:
<= blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-l= eft:1px solid rgb(204,204,204);padding-left:1ex">On Wed, Feb 20, 2019 at 10= :10:01AM -0500, Jon Ringle wrote:
> On Wed, Feb 20, 2019 at 9:42 AM Michael Olbrich <m.olbrich@pengutronix.de>= ;
> wrote:
> > On Wed, Feb 20, 2019 at 09:09:18AM -0500, Jon Ringle wrote:
> > > On Wed, Feb 20, 2019 at 8:22 AM Ian Abbott <abbotti@mev.co.uk> wrote:<= br> > > >
> > > > On 20/02/2019 13:17, Ian Abbott wrote:
> > > > > On 20/02/2019 00:59, Jon Ringle wrote:
> > > > >> I've got a strange permission problem when= I build on our build
> > server
> > > > >> that was recently updated from Ubuntu-14.04 to= Ubuntu-16.04.
> > > > >>
> > > > >> On our Ubuntu-16.04 server, on most of the pla= tform/packages/
> > > > >> subdirectories the packages are getting create= d with other having no
> > > > >> permissions at all:
> > > > >>
> > > > >> rootfs/platform-ec1c/packages$ tree -d -L 1 -p=
> > > > >> .
> > > > >> =E2=94=9C=E2=94=80=E2=94=80 [drwxr-x---]=C2=A0= attr-2.4.47
> > > > >> =E2=94=9C=E2=94=80=E2=94=80 [drwxr-x---]=C2=A0= avahi-0.7
> > > > >> =E2=94=9C=E2=94=80=E2=94=80 [drwxr-x---]=C2=A0= bash-4.3.30
> > > > >> =E2=94=9C=E2=94=80=E2=94=80 [drwxr-x---]=C2=A0= boost_1_67_0
> > > > >> =E2=94=9C=E2=94=80=E2=94=80 [drwxr-x---]=C2=A0= busybox-1.29.3
> > > > >> =E2=94=9C=E2=94=80=E2=94=80 [drwxr-x---]=C2=A0= coreutils-8.29
> > > > >> ...
> > > > >>
> > > > >> This results in all files contained within tho= se directories to also
> > > > >> have no perms for other, and get installed on = my target in the same
> > > > >> way. This in turn then causes permission probl= ems to occur.
> > > > >>
> > > > >> I'm at a loss as to what to look for to re= solve this problem.
> > > > >>
> > > > >> Suggestions?
> > > > >
> > > > > I think you are building with umask 0027, so files= are created with
> > no
> > > > > permissions for 'other' users.=C2=A0 This = should not affect the contents
> > of
> > > > > the platform-ec1c/packages/*.ipk files, or the con= tents of the
> > > > > platform-ec1c/root/ directory, or the contents of = the
> > > > > platform-ec1c/images/root.* images, which should a= ll contain files
> > with
> > > > > the correct permissions for the target.
> > > >
> > > > Correction: The platform-ec1c/root/ directory contents = do not have the
> > > > correct ownership for the target, but the file mode bit= s should be
> > correct.
> > > >
> > > >
> > > I also thought that perhaps it was a umask issue, but as you= can see
> > below,
> > > umask is 0022, which should be ok.
> > > The permission problem that I am having on the target is tha= t
> > > systemd-networkd.service won't start because it can'= t read the
> > > configuration files below. These files are installed in syst= emd.make via:
> > >
> > > ifdef PTXCONF_SYSTEMD_NETWORK
> > >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0@$(call install_tree, syste= md, 0, 0, -, /usr/lib/systemd/network)
> > >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0@$(call install_alternative= _tree, systemd, 0, 0,
> > > /usr/lib/systemd/network)

Another idea: This is in ptxdist or your BSP. What are the files
permissions there?


My BSP doesn't have the directory,= projectroot/usr/lib/systemd/network/

ptxdist proj= ectroot is providing eth0.network, that has the correct permissions.
<= div>
jringle@dev-atl-bamb01:/usr/local/lib/ptxdist-2019.01.0_GP/project= root/usr/lib/systemd/network$ ll
total 12
drwxr-xr-x 2 = root root 4096 Feb 12 05:18 ./
drwxr-xr-x 4 root root 4096 Feb 12= 05:18 ../
-rw-r--r-- 1 root root=C2=A0 =C2=A070 Feb 12 05:18 eth= 0.network

The 80-container-*.network files t= hat have the wrong permissions are coming from the install_tree, not the in= stall_alternative_tree, which is provided by the systemd itself:
=
jringle@= dev-atl-bamb01:/srv/gpec-build/rootfs/platform-ec1c/packages/temp/data/usr/= lib/systemd/network$ ll
total = 28
drwxr-xr-x 2 jringle domain= ^users 4096 Jan=C2=A0 1 00:00 ./=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2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=C2=A070 Jan=C2=A0 1 00:00 eth0.network=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0

--000000000000bd9a3905825507ab-- --===============1986354890== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KcHR4ZGlzdCBt YWlsaW5nIGxpc3QKcHR4ZGlzdEBwZW5ndXRyb25peC5kZQ== --===============1986354890==--