Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

7
  • 7
    Beware that processes that have files or directories opened (including as their current working directory) will retain access to them after that chmod g-rwx. The check for permission is done at opening (or chdir) time. So you'd likely also want to kill the sessions of those users after the chmod g-rwx. Commented Oct 21 at 18:14
  • 4
    Beware at is not installed by default (despite it being a non-optional POSIX command) in recent versions of Debian. You may need a sudo apt install at. Commented Oct 21 at 18:15
  • @StéphaneChazelas I did not realize that at wasn't installed by default - good catch. Interesting question, at least to me, is if a user has a file open in vi or some other editor that keeps a second temp file open for editing and copies that file back to the original location when done, what happens if the directory and/or original file no longer allows writes? Commented Oct 21 at 18:19
  • 2
    I suppose the idea is that you're expected to use systemd-run or something like that which avoids having to run another daemon. Commented Oct 21 at 18:20
  • 3
    Related: using systemd-run to replace 'at' commands Commented Oct 21 at 18:28