filed

Job queue using FUSE

git clone git://mccd.space/filed

commit da905cf68817197e8f56118ab66c2916a649f325
parent 4d3ecaa53688cd0cd5c24245a0d076142b799a54
Author: Marc Coquand <marc@coquand.email>
Date:   Sun, 14 Dec 2025 20:43:01 +0100

Update default access rights and docs

Diffstat:
Mconfig.go | 2+-
Mmain.go | 4++--
Mnewid.go | 2+-
Mqj.1.scd | 9++++++++-
4 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/config.go b/config.go
@@ -20,7 +20,7 @@ type ConfigFile struct {
 
 func (f *ConfigFile) Attr(ctx context.Context, a *fuse.Attr) error {
 	config := f.manager.store.GetConfig()
-	a.Mode = 0o744
+	a.Mode = 0o740
 	a.Gid = uint32(os.Getgid())
 	a.Uid = uint32(os.Getuid())
 	a.Inode = f.inode
diff --git a/main.go b/main.go
@@ -121,7 +121,7 @@ type PendingDir struct {
 }
 
 func (PendingDir) Attr(ctx context.Context, a *fuse.Attr) error {
-	a.Mode = os.ModeDir | 0o775
+	a.Mode = os.ModeDir | 0o750
 	a.Gid = uint32(os.Getgid())
 	a.Uid = uint32(os.Getuid())
 	a.Inode = 2
@@ -258,7 +258,7 @@ type JobDir struct {
 }
 
 func (jd JobDir) Attr(ctx context.Context, a *fuse.Attr) error {
-	a.Mode = os.ModeDir | 0o775
+	a.Mode = os.ModeDir | 0o750
 
 	a.Gid = uint32(os.Getgid())
 	a.Uid = uint32(os.Getuid())
diff --git a/newid.go b/newid.go
@@ -36,7 +36,7 @@ type NewIdFile struct {
 }
 
 func (f NewIdFile) Attr(ctx context.Context, a *fuse.Attr) error {
-	a.Mode = 0o444
+	a.Mode = 0o440
 	a.Gid = uint32(os.Getgid())
 	a.Uid = uint32(os.Getuid())
 	a.Inode = f.inode
diff --git a/qj.1.scd b/qj.1.scd
@@ -38,7 +38,14 @@ qj exposes 2 files:
 
 # SECURITY CONSIDERATIONS
 
-qj uses unix file permissions to manage access. 
+All commands are executed using the same user as the main process. Access
+is configured the same way you configure other files on Unix systems.
+
+By default, all write operations are allowed by the executing user, and all
+read operations by the executing user's group. All other users have zero 
+access to the system.
+
+(TODO) The access rights can be modified using _CHOWN(1)_ and _CHMOD(1)_.
 
 # EXAMPLES