This is an automated email from the ASF dual-hosted git repository.

linguini1 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 9451848de3e Documentation/nsh: add chmod and chown command docs
9451848de3e is described below

commit 9451848de3e4570cb534429b8f6ca313840571d2
Author: Abhishek Mishra <[email protected]>
AuthorDate: Wed May 13 23:30:25 2026 +0000

    Documentation/nsh: add chmod and chown command docs
    
    Document the new NSH chmod and chown builtins,
    including supported numeric permission and
    ownership forms.
    
    Signed-off-by: Abhishek Mishra <[email protected]>
---
 Documentation/applications/nsh/commands.rst | 45 +++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)

diff --git a/Documentation/applications/nsh/commands.rst 
b/Documentation/applications/nsh/commands.rst
index 56052bcc386..bc6abcafc23 100644
--- a/Documentation/applications/nsh/commands.rst
+++ b/Documentation/applications/nsh/commands.rst
@@ -198,6 +198,51 @@ Also sets the previous working directory environment 
variable
 ``cd ..``              sets the current working directory to the parent 
directory.
 ==================  =====================================
 
+.. _cmdchmod:
+
+``chmod`` Change File Permissions
+==================================
+
+**Command Syntax**::
+
+  chmod <octal-mode> <path>
+
+**Synopsis**. Change the permission bits of ``<path>``. Only numeric
+(octal) modes are supported.
+
+**Example**::
+
+  nsh> chmod 600 /tmp/secret
+  nsh> chmod 755 /usr/bin/app
+
+.. _cmdchown:
+
+``chown`` Change File Owner and Group
+======================================
+
+**Command Syntax**::
+
+  chown <uid>[:gid] <path>
+
+**Synopsis**. Change the owner and/or group of ``<path>``. Only
+numeric uid and gid values are accepted. Omitted uid or gid fields
+are left unchanged.
+
+**Forms:**
+
+===================  
===============================================================
+``chown uid:gid``    Sets owner to uid and group to gid.
+``chown uid``        Sets owner to uid; group is unchanged.
+``chown uid:``       Sets owner to uid; group is unchanged.
+``chown :gid``       Sets group to gid; owner is unchanged.
+===================  
===============================================================
+
+**Example**::
+
+  nsh> chown 1000:1000 /tmp/file
+  nsh> chown 0: /tmp/file
+  nsh> chown :100 /tmp/file
+
 .. _cmdcmp:
 
 ``cmp`` Compare Files

Reply via email to