mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Michael Olbrich <m.olbrich@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: Re: [ptxdist] strange permission behavior
Date: Wed, 20 Feb 2019 15:23:48 +0100	[thread overview]
Message-ID: <20190220142348.4xebli4lynty5swy@pengutronix.de> (raw)
In-Reply-To: <b863fef0-938e-a72a-9d8b-bc1b52c151d5@mev.co.uk>

On Wed, Feb 20, 2019 at 01:22:25PM +0000, 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,

This makes no sense. I can see that (with umask 0027) the directories may
have this mode because we create them with 'mkdir' in
ptxd_make_world_install_prepare() and no mode is set.

But the files should have the correct permissions. E.g. 'attr' installs all
files with explicitly specified modes, so that should be independent of the
umask.

> > > 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.

We explicitly set the mode in install_copy, so for the most part it should
be correct regardless of the permissions in packages/. The exceptions are
install_tree, install_glob, etc. Here we pick the mode from the source
file. So there may be some issues with directory permissions.

> Correction: The platform-ec1c/root/ directory contents do not have the
> correct ownership for the target, but the file mode bits should be correct.

For the most part. We also skip any suid bits because they don't make sense
without the ownership.

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 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

      parent reply	other threads:[~2019-02-20 14:23 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-20  0:59 Jon Ringle
2019-02-20 13:17 ` Ian Abbott
2019-02-20 13:22   ` Ian Abbott
2019-02-20 14:09     ` Jon Ringle
2019-02-20 14:42       ` Michael Olbrich
2019-02-20 15:10         ` Jon Ringle
2019-02-20 15:20           ` Michael Olbrich
2019-02-20 15:29             ` Jon Ringle
2019-02-20 15:43               ` Michael Olbrich
2019-02-21 13:47                 ` Jon Ringle
2019-02-20 14:23     ` Michael Olbrich [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190220142348.4xebli4lynty5swy@pengutronix.de \
    --to=m.olbrich@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox