aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2020-04-29 23:10:11 +1200
committerTom Ryder <tom@sanctum.geek.nz>2020-04-29 23:11:06 +1200
commit4e10a60e49e9e5d5baa06df1fcbeb1b5fdb103ee (patch)
tree31b4f0c591cecb8755ab859c6b82ae73f250a64e /README.md
downloadinotifymask-4e10a60e49e9e5d5baa06df1fcbeb1b5fdb103ee.tar.gz
inotifymask-4e10a60e49e9e5d5baa06df1fcbeb1b5fdb103ee.zip
First commitv0.01
Diffstat (limited to 'README.md')
-rw-r--r--README.md39
1 files changed, 39 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..efc82b1
--- /dev/null
+++ b/README.md
@@ -0,0 +1,39 @@
+inotifymask
+===========
+
+This tool sets up Linux kernel `inotify` hooks on a set of directories to apply
+a bit mask to their permissions on file creation within or movement into the
+watched directories, logging each permission change. This can be used as a way
+to enforce permissions for uncooperative applications that don't allow
+specifying permissions or masking.
+
+Install
+-------
+
+ $ cpanm Const:Fast Linux::Inotify2
+ $ perl Makefile.PL
+ $ make
+ $ sudo make install
+
+Use
+---
+
+ $ inotifymask 0177 ~/.cache/private ~/.cache/private/templates
+
+Works well as a user-level systemd service; see included `inotifymask.service`
+template.
+
+ $ mkdir -p ~/.config/systemd/user
+ $ cp inotifymask.service ~/.config/systemd/user
+ $ vi inotifymask.service # Change command line to specify your paths
+ $ systemctl --user enable inotifymask.service
+ $ systemctl --user start inotifymask.service
+ $ systemctl --user status inotifymask.service
+
+License
+-------
+
+Copyright (c) [Tom Ryder][1]. Distributed under [MIT License][2].
+
+[1]: https://sanctum.geek.nz/
+[2]: https://opensource.org/licenses/MIT