Well, anyway, the solution I currently use I do not like, and the solution I discovered I thought might work seems not to work, and I’ve tried going back to it every now and then.
The sshd
service can be configured to chroot
users using ChrootDirectory
in sshd_config
. What I’ve wanted to do is make a user than only has access to /home/user-data/backup/encrypted/
as the directory and files are all owned by root
. That way I can just have a remote server log in, rsync
the files, and log out, without fear that anything worse could happen to MiaB.
What I’ve tried to do is make /home/user-data/backup/encrypted/
the home directory of backupuser
, but sshd
won’t allow it because it throws the following in the logs:
Mar 10 11:40:50 mail sshd[18684]: fatal: bad ownership or modes for chroot directory component "/home/user-data/"
If anyone is interested, here is one article discussing a configuration: