I'm trying to create a jailed user for limited SSH access on my Mac. I have been, for the most part, following the directions in this Ubuntu StackExchange answer.
However, I'm getting stuck:
# First, added `root` group via System Preferences > Users & Groups # (`/sbin/groupadd` is not present on macOS) $ sudo chown root:root /Users/jail $ ls -ld /Users/jail drwxr-xr-x+ 13 root root 442 Jan 12 15:21 /Users/jail $ sudo /usr/local/Cellar/jailkit/2.19/sbin/jk_init -v /Users/jail basicshell ERROR: /Users/jail is not owned by root:root! ERROR: jail directory /Users/jail is not safe
This mailing list message looks relevant, but I'm not 100% sure (basically, jailkit wants the entire directory tree leading up to the chroot jail to be owned by
/ is owned by
root:wheel by default on a Mac).
Any insight would be greatly appreciated.