Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/CISOfy/lynis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormboelen <michael@cisofy.com>2014-09-08 21:40:08 +0400
committermboelen <michael@cisofy.com>2014-09-08 21:40:08 +0400
commit9ed32c4e2f4253f4837abf238e5ac2826032a096 (patch)
tree995593a3bb7e12eda15a66df762d21b030bc7a8a
parent2ce4cf5c5712dfa7a2bceba34d09a9de96cf167f (diff)
Adjusted hints to solve wrong file permissions
-rwxr-xr-xlynis12
1 files changed, 4 insertions, 8 deletions
diff --git a/lynis b/lynis
index 283c4ba9..dfd0c2f9 100755
--- a/lynis
+++ b/lynis
@@ -91,19 +91,19 @@
ISSUE=0
# Check permissions of include/consts file
if [ ! "${PERMS}" = "r--------" -a ! "${PERMS}" = "rw-------" ]; then
- ISSUE=1; echo "[!] Change file permissions of ${INCLUDEDIR}/consts to 600."
+ ISSUE=1; echo "[!] Change file permissions of ${INCLUDEDIR}/consts to 600."; echo " Command: chmod 600 ${INCLUDEDIR}/consts"
fi
# Check permissions of include/functions file
if [ ! "${PERMS2}" = "r--------" -a ! "${PERMS2}" = "rw-------" ]; then
- ISSUE=1; echo "[!] Change file permissions of ${INCLUDEDIR}/functions to 600."
+ ISSUE=1; echo "[!] Change file permissions of ${INCLUDEDIR}/functions to 600."; echo " Command: chmod 600 ${INCLUDEDIR}/functions"
fi
# Check if owner of both files is root user, or the same user which is running Lynis (for pentester mode)
if [ ! "${OWNER}" = "root" -a ! "${OWNERID}" = "0" -a ! "${MYID}" = "${OWNER2ID}" ]; then
- ISSUE=1; echo "[!] Change ownership of ${INCLUDEDIR}/consts to 'root' or similar (found: ${OWNER} with UID ${OWNERID})."
+ ISSUE=1; echo "[!] Change ownership of ${INCLUDEDIR}/consts to 'root' or similar (found: ${OWNER} with UID ${OWNERID})."; echo " Command: chown root:root ${INCLUDEDIR}/consts"
fi
# Check if owner of both files is root user, or the same user which is running Lynis (for pentester mode)
if [ ! "${OWNER2}" = "root" -a ! "${OWNER2ID}" = "0" -a ! "${MYID}" = "${OWNER2ID}" ]; then
- ISSUE=1; echo "[!] Change ownership of ${INCLUDEDIR}/functions to 'root' or similar (found: ${OWNER2} with UID ${OWNER2ID})."
+ ISSUE=1; echo "[!] Change ownership of ${INCLUDEDIR}/functions to 'root' or similar (found: ${OWNER2} with UID ${OWNER2ID})."; echo " Command: chown root:root ${INCLUDEDIR}/functions"
fi
if [ ${ISSUE} -eq 0 ]; then
@@ -113,10 +113,6 @@
echo ""; echo "";
echo "[X] Security check failed: See action above to correct this issue."
echo " Please change ownership and permissions of the related files and start Lynis again."
- echo ""
- echo "Related commands:"
- echo "chown root:root ${INCLUDEDIR}/*"
- echo "chmod 600 ${INCLUDEDIR}/*"
echo ""; echo "";
exit 1
fi