On Mon, Aug 09, 2021 at 09:51:39AM +0200, Harald Dunkel wrote: > On 8/5/21 11:13 AM, Bastien Durel wrote: > > > > Since then, I put the mount points directories immutable (before mount) > > > > fremen# mkdir /tmp/foo > > fremen# chflags schg /tmp/foo > > fremen# touch /tmp/foo/bar > > touch: /tmp/foo/bar: Operation not permitted > > fremen# ls -loa /tmp/foo > > total 8 > > drwxr-xr-x 2 root wheel schg 512 Aug 5 11:01 . > > drwxrwxrwt 14 root wheel - 512 Aug 5 11:01 .. > > fremen# mount /dev/vnd0a /tmp/foo/ > > fremen# touch /tmp/foo/bar > > fremen# ls -lao /tmp/foo/ > > total 8 > > drwxr-xr-x 2 root wheel - 512 Aug 5 11:10 . > > drwxrwxrwt 14 root wheel - 512 Aug 5 11:10 .. > > -rw-r--r-- 1 root wheel - 0 Aug 5 11:10 bar > > > > Regards, > > > > Cool idea > > Harri >
Note that other approaches (like setting permission bits on the dir before mount) can encounter the CAVEAT in mount(8). -Otto