jailkit-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Jailkit-dev] Strange files permissions


From: ihorsl
Subject: [Jailkit-dev] Strange files permissions
Date: Sun, 1 Jan 2017 04:07:52 +0200

After running

jk_init     -v -j /jail/$USERNAME basicshell
jk_jailuser     -m -j /jail/$USERNAME -s /bin/bash $USERNAME

I have noticed strange file permissions !

1. Files in bin and lib a readable for others

2. /usr/sbin/jk_chrootsh requires read access for "others"
to files

etc/passwd
etc/group
etc/profile


so I had to fix permissions with adding following lines after your scripts


chmod -R g-w,o=x bin
chmod o+r bin

chmod -R g-w,o=x lib

chmod -R g-w,o=x usr
chmod o+r usr
chmod o+r usr/bin


chmod o+r ./etc/passwd
chmod o+r ./etc/group
chmod o+r ./etc/profile

reply via email to

[Prev in Thread] Current Thread [Next in Thread]