I have a java application in /usr/local that keeps writing to a text file on a daily basis. I need a particular user to be able to read this file. What is the best way to do that? I have recently read a lot about chroot/jailkit, including this question -- is chroot a good way to handle it?
Tell me more
×
Unix & Linux Stack Exchange is a question and answer site for
users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.
|
|
|||||
|
|
Look at the man-page for sshd_config. Use a chroot-jail and the "internal" sftp-setting. This reduces what needs to be in the chroot-jail to a few devices - no binaries and no libraries are needed there in sftp-internal mode. I think the devices were null, random, urandom and some ttys. /path/to/your/chroot/ There you need the dev/ subdirectory and the mentiones devices (use mknod to create them just the same way they do exist in /dev/. Put the public key of your user to /home/yourchrootuser/.ssh/authorized_keys. SSHD will first evaluate that key, then switch to the chrooted environment. |
|||||||||||
|