mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-06-18 19:29:21 +01:00
Move the explanation of umask 022 from settingenviron to aboutlfs
Explain it once we use it. Also fix an error in the text (we don't make files executable, we only make directories searchable).
This commit is contained in:
parent
625969c2de
commit
39679232f7
@ -33,6 +33,16 @@
|
|||||||
default:</para>
|
default:</para>
|
||||||
|
|
||||||
<screen role="nodump"><userinput>umask 022</userinput></screen>
|
<screen role="nodump"><userinput>umask 022</userinput></screen>
|
||||||
|
|
||||||
|
<para>Setting the umask to 022 ensures that newly created files and
|
||||||
|
directories are only writable by their owner, but are readable and
|
||||||
|
searchable (only for directories) by anyone (assuming default modes are
|
||||||
|
used by the <ulink role='man' url='&man;open.2'>open(2)</ulink> system
|
||||||
|
call, new files will end up with permission mode 644 and directories with
|
||||||
|
mode 755). An over-permissive default can leave security holes in the
|
||||||
|
LFS system, and an over-restrictive default can cause strange issues
|
||||||
|
building or using the LFS system.</para>
|
||||||
|
|
||||||
<caution>
|
<caution>
|
||||||
<para>Do not forget to check that <envar>LFS</envar> is set and the
|
<para>Do not forget to check that <envar>LFS</envar> is set and the
|
||||||
umask is set to <literal>022</literal> whenever
|
umask is set to <literal>022</literal> whenever
|
||||||
|
@ -76,11 +76,8 @@ EOF</userinput></screen>
|
|||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><parameter>umask 022</parameter></term>
|
<term><parameter>umask 022</parameter></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Setting the user file-creation mask (umask) to 022 ensures that newly
|
<para>Setting the umask as we've already explained in
|
||||||
created files and directories are only writable by their owner, but are
|
<xref linkend='ch-partitioning-aboutlfs' role='.'/></para>
|
||||||
readable and executable by anyone (assuming default modes are used by the
|
|
||||||
<ulink role='man' url='&man;open.2'>open(2)</ulink> system call, new files
|
|
||||||
will end up with permission mode 644 and directories with mode 755).</para>
|
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user