All of lore.kernel.org
 help / color / mirror / Atom feed
* Directory permissions and ownership -- RFC
@ 2011-06-21 16:43 Mark Hatle
  2011-06-21 18:57 ` Phil Blundell
  0 siblings, 1 reply; 16+ messages in thread
From: Mark Hatle @ 2011-06-21 16:43 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

I've had the task to resolve the directory permissions and ownership issues.
From the original RFC I sent out, a lot has changed.

The way OE, opkg and deb packages are defined, there is no way to define what
package "owns" a directory.  There is an expectation that directory permissions,
owner and group are consistent between packages (and thus recipes).

I've worked though a number of the issues.  While I'm not posting the patches
yet for inclusion, I'd like some feed back on the two specific patches below.

Patch 1:

Adjust the umask to 022.  This resolves the problem of dynamically generated
directories (mkdir -p) and specific files (touch foo) having odd permissions.

http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=mhatle/perms&id=d8470b6a8efdbba04cef5d4dc1ce12720fe83621

Patch 2:

The item adds a new step to the package.bbclass, fixup_perms.  The function that
is responsible for fixing directory and file permissions, owners and groups
during the packaging process. This will fix various issues where two packages
may create the same directory and end up with different permissions, owner
and/or group.

The issue being resolved is that if two packages conflict in their ownership of
a directory, the first installed into the rootfs sets the permissions. This
leads to a least potentially non-deterministic filesystems, at worst security
defects.

The function has a set of default values. We sanitize all of the system
directories, as defined in bitbake.conf as 0755, root, root. We also have
determined as series of documentation directories. These are sanitized as 0755,
root, root with the files they contain as 0644, root, root. The user can add
their own settings, or override the defaults by providing a
meta/files/fs-perms.txt file. The format of this file is described in the
default file.

http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=mhatle/perms&id=eb76974fb73f2793e9d6191fb12d502fefc74c80


Any comments/feedback is appreciated.

--Mark



^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2011-06-22 18:52 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-21 16:43 Directory permissions and ownership -- RFC Mark Hatle
2011-06-21 18:57 ` Phil Blundell
2011-06-21 19:12   ` Mark Hatle
2011-06-21 21:09     ` Phil Blundell
2011-06-21 21:27       ` Mark Hatle
2011-06-21 21:37         ` Phil Blundell
2011-06-22  0:35           ` Mark Hatle
2011-06-22  5:47         ` Anders Darander
2011-06-21 21:32     ` Koen Kooi
2011-06-21 21:41       ` Mark Hatle
2011-06-21 21:52         ` Phil Blundell
2011-06-21 21:58           ` Phil Blundell
2011-06-21 22:05     ` Richard Purdie
2011-06-21 22:13       ` Mark Hatle
2011-06-22  4:51         ` Mark Hatle
2011-06-22 14:04           ` Mark Hatle

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.