This is an automated email from the ASF dual-hosted git repository.
xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new ad7b9064d6b Documentation/nxinit: Describe CONFIG_SYSTEM_NXINIT_UMASK.
ad7b9064d6b is described below
commit ad7b9064d6b59af10dc68893a4c552356c1c2dae
Author: Marco Casaroli <[email protected]>
AuthorDate: Mon Nov 2 12:31:39 2026 +0100
Documentation/nxinit: Describe CONFIG_SYSTEM_NXINIT_UMASK.
NXInit can set the file mode creation mask when it starts (apps
system/nxinit). Describe the option and its empty default, and say
that a system with file permissions can set 022.
Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Marco Casaroli <[email protected]>
---
Documentation/applications/system/nxinit/index.rst | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/Documentation/applications/system/nxinit/index.rst
b/Documentation/applications/system/nxinit/index.rst
index 0a270fc4935..e0121a12ac8 100644
--- a/Documentation/applications/system/nxinit/index.rst
+++ b/Documentation/applications/system/nxinit/index.rst
@@ -27,6 +27,14 @@ is a preprocessor directive.
File path configured by ``CONFIG_SYSTEM_NXINIT_RC_FILE_PATH``.
+At start, NXInit sets the file mode creation mask (see ``umask()``) to the
+octal value of ``CONFIG_SYSTEM_NXINIT_UMASK``. All commands and services
+inherit it. The default is empty: NXInit keeps the mask that it got, and NuttX
+starts the first task with the mask 0. A system with file permissions
+(``CONFIG_FS_PERMISSION``) can set ``022``, as sysvinit and systemd do. Then
+the files and directories that programs create with the mode 0666 or 0777 are
+not writable by all users.
+
1. Actions and Commands
-----------------------
.. code-block::