From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1gwT4V-0008L6-4P for ptxdist@pengutronix.de; Wed, 20 Feb 2019 15:42:03 +0100 Received: from mol by ptx.hi.pengutronix.de with local (Exim 4.89) (envelope-from ) id 1gwT4U-0002yH-SP for ptxdist@pengutronix.de; Wed, 20 Feb 2019 15:42:02 +0100 Date: Wed, 20 Feb 2019 15:42:02 +0100 From: Michael Olbrich Message-ID: <20190220144202.pilz3kgql5k3hqz5@pengutronix.de> References: <28b3d3f0-8281-64e5-ae67-2b43b49348b6@mev.co.uk> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="6iuk2wydew4mvndu" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: 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 Errors-To: ptxdist-bounces@pengutronix.de Sender: "ptxdist" To: ptxdist@pengutronix.de --6iuk2wydew4mvndu Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit 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 build 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 > > >> . > > >> ├── [drwxr-x---] attr-2.4.47 > > >> ├── [drwxr-x---] avahi-0.7 > > >> ├── [drwxr-x---] bash-4.3.30 > > >> ├── [drwxr-x---] boost_1_67_0 > > >> ├── [drwxr-x---] busybox-1.29.3 > > >> ├── [drwxr-x---] coreutils-8.29 > > >> ... > > >> > > >> This results in all files contained within those directories to 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 have the > > correct ownership for the target, but the file mode bits 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 that > systemd-networkd.service won't start because it can't read the > configuration files below. These files are installed in systemd.make 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) > endif > @$(call install_alternative, systemd, 0, 0, 0644, \ > /usr/lib/systemd/network/99-default.link) Right, install_alternative_tree picks the source file permissions. The question is, why are those incorrect? I've come across some issues with fakeroot and permissions elsewhere. Can you run the attached script with the fakeroot from sysroot-host/ and send the results? Michael -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | --6iuk2wydew4mvndu Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=fake-test #!/bin/sh umask 022 touch empty chmod 0644 empty cp -a empty empty-a cp -r --preserve=ownership,timestamps,links empty empty-r ls -l -n empty* getfacl -n empty* rm empty* --6iuk2wydew4mvndu Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KcHR4ZGlzdCBt YWlsaW5nIGxpc3QKcHR4ZGlzdEBwZW5ndXRyb25peC5kZQ== --6iuk2wydew4mvndu--