Commit Graph

10 Commits

Author SHA1 Message Date
Robert P. J. Day f420e4a071 fs-perms.txt: Two cleanup tweaks for consistency.
* Remove duplicate entry for /srv already defined earlier in file.
* Use "${localstatedir}" rather than "/var" for consistency.

(From OE-Core rev: 0cb3a4b299506b4503c5728a0f0c80db8d603e91)

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-17 16:53:05 +00:00
Robert Yang ffa2ca007f fs-perms.txt: fix ROOT_HOME's permission
It should be 0700 rather than 0755.

Reported-by: Charles Chan <charles.wh.chan@gmail.com>
(From OE-Core rev: 37aac647d510557323083c77c3114476440a325d)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-15 06:59:44 +01:00
Ross Burton fd66a382ac Revert "fs-perms.txt: fix ROOT_HOME's permission"
This reverts commit eeae2ac488.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-15 06:59:43 +01:00
Robert Yang eeae2ac488 fs-perms.txt: fix ROOT_HOME's permission
It should be 0700 rather than 0755.

Reported-by: Charles Chan <charles.wh.chan@gmail.com>
(From OE-Core rev: 4ac2e5493671b198e562732e5fd8f525247527e4)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-14 10:58:34 +01:00
Paul Gortmaker c6a57f7f4c base-files: fix up misleading dir grouping names for lsb dirs
In commit b0df35f47f
("base-files: Add to make some directories needed by LSB.") there
were new groupings of dirs made.  But rather than keep the grouping
names permissions based as they clearly were, it seems that it was
unfortunately misinterpreted as a counter, simply incrementing as
a new group was added.

This leads to dir3755 getting chmod'd to 0755 and dir4775 being
chmod'd to 2775 which to any new reader of the code is terribly
confusing.

Choose names that clearly reflect the permissions, and add a lsb
suffix to indicate the role.

Also note that the settings for /var/mail seem incorrect, and so
they have been aligned with what is seen in most common distros.

(From OE-Core rev: 5cba414e3fd7dbe761a6f628c6a368a412c0cba3)

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-29 09:58:26 +01:00
Paul Gortmaker caea71ff33 base-files: remove strange 2775 perms from dirs like /home
Mark Hatle did the historical research into why this was so,
and found that it originally was via debian import, and then
it morphed over time:

<fray> +#   chown -R root:root ${D}
<fray> +#   cd ${D} && chown root:src     usr/src
<fray> +#   cd ${D} && chown root:staff   var/local
<fray> +#   cd ${D} && chown root:staff   home
<fray> +    cd ${D} && chmod 755  `find . -type d`
<fray> +    cd ${D} && chmod 1777 `cat ${S}/debian/1777-dirs`
<fray> +    cd ${D} && chmod 2775 `cat ${S}/debian/2775-dirs`
<fray> that was the original code
<fray> so THAT is why they're 2775..
<fray> they were original 'src' and 'staff'.. which has gotten lost
      sometime in the last 10 years

<fray> AND the origin:
<fray> commit b45c9ed40bb4f893f99127a21776aef3ae888ad7
<fray> Author: Chris Larson <clarson@kergoth.com>
<fray> Date:   Tue Sep 30 16:30:41 2003 +0000
<fray>     Add base-files 3.0.10 (from debian).
<fray> thats where the brain damage started ... Debian in 2003..

Here we simply convert them to being normal 755 dirs.

[YOCTO #6579]

(From OE-Core rev: 77e4defa57f02b7f7ad23b07f169ec280228585b)

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-29 09:58:26 +01:00
Jonathan Liu ea647cd9ee base-files: add /run directory from FHS 3 draft specification
This adds the /run directory from the Filesystem Hierarchy Standard 3.0
Draft [1] and refactors the filesystem as follows:
- Remove creation of /var/volatile/run
- Remove creation of /var/volatile/lock
- Remove symbolic link from /var/run to /var/volatile/run
- Remove symbolic link from /var/lock to /var/volatile/lock
- Add symbolic link from /var/run to /run
- Add symbolic link from /var/lock -> /run/lock
- Add /run to /etc/fstab for sysvinit compatibility

[1] http://www.linuxbase.org/betaspecs/fhs/fhs.html#runRuntimeVariableData

(From OE-Core rev: 0e326280a15b0f2c4ef2ef4ec441f63f55b75873)

Signed-off-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-29 22:07:56 +01:00
Phil Blundell 53276bc724 fs-perms.txt: Don't tinker with file modes in /usr/src/debug
Since 6775feb9fe935ab01fd9cae2b2d3fce5824a9a72 our local "copy" of the
debug sources has in fact been hardlinked to ${S} and potentially other
places too.  This means that any modifications we make to these files
might have wider consequences than intended.

Avoid this potential pitfall by telling fixup_perms() to leave the file
modes in this directory alone.  No great harm will result from shipping
debug sources with a mode other than 0644: if the mode was permissive
enough for us to compile the sources in the first place then it must
also be permissive enough for subsequent debugging.

(From OE-Core rev: 91b02c65d83811738d4c0e4b7c454459430c8b9b)

Signed-off-by: Phil Blundell <philb@gnu.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-03 16:19:20 +01:00
Laurentiu Palcu 0bb55777ba fs-perms: remove /var/cache from volatiles
(From OE-Core rev: a3b84a3a3d94252060eae076f6dd54e6bf12dfb1)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06 09:37:29 +00:00
Mark Hatle 8781c843cf classes/package.bbclass: Add fixup_perms
Add a new 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 user can specify their own settings via the configuration files
specified in FILESYSTEM_PERMS_TABLES.  If this is not defined, it will
fall back to loading files/fs-perms.txt from BBPATH.  The format of this
file is documented within the file.

By default all of the system directories, specified in bitbake.conf, will
be fixed to be 0755, root, root.

The fs-perms.txt contains a few default entries to correct documentation,
locale, headers and debug sources.  It was discovered these are often
incorrect due to being directly copied from the build user environment.

The entries needed to match the base-files package have also been added.

Also tweak a couple of warnings to provide more diagnostic information.

(From OE-Core rev: 8c720efa053f81dc8d2bb604cdbdb25de9a6efab)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-30 22:54:04 +01:00