From 6f8e692be1c196113b91ad1986a00c9d6f6f0e48 Mon Sep 17 00:00:00 2001 From: hachem Date: Wed, 21 Oct 2026 06:45:53 +0200 Subject: feat: user stuff like perms etc.. --- gils/chown.rv | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 gils/chown.rv (limited to 'gils/chown.rv') diff --git a/gils/chown.rv b/gils/chown.rv new file mode 100644 index 0000000..b64101d --- /dev/null +++ b/gils/chown.rv @@ -0,0 +1,17 @@ +# chown +# chown lung hachem + +const context = env.ctx + +if context.argv:len() < 3 do + fail("usage: chown \n") +end else do + const uid = user_uid(context.argv[1]) + if uid < 0 do + fail("chown: #{context.argv[1]}: no such user\n") + end else do + const path = expand_path(context.argv[2]) + if (fs:chown(path, uid) == :false) + fail("chown: #{path}: no such file\n") + end +end -- cgit v1.3