From 1c6d58b959bba47a67b09f562d30f47b617c3168 Mon Sep 17 00:00:00 2001 From: Bryan Bende Date: Tue, 19 Jul 2016 13:23:55 -0400 Subject: [PATCH] NIFI-929 Changing permissions of nifi.pid to be readable by all, writable only by user This closes #677 Signed-off-by: jpercivall --- .../src/main/java/org/apache/nifi/bootstrap/RunNiFi.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nifi-bootstrap/src/main/java/org/apache/nifi/bootstrap/RunNiFi.java b/nifi-bootstrap/src/main/java/org/apache/nifi/bootstrap/RunNiFi.java index 657620fd92..173a19919b 100644 --- a/nifi-bootstrap/src/main/java/org/apache/nifi/bootstrap/RunNiFi.java +++ b/nifi-bootstrap/src/main/java/org/apache/nifi/bootstrap/RunNiFi.java @@ -434,8 +434,10 @@ public class RunNiFi { try { final Set perms = new HashSet<>(); - perms.add(PosixFilePermission.OWNER_READ); perms.add(PosixFilePermission.OWNER_WRITE); + perms.add(PosixFilePermission.OWNER_READ); + perms.add(PosixFilePermission.GROUP_READ); + perms.add(PosixFilePermission.OTHERS_READ); Files.setPosixFilePermissions(pidFile.toPath(), perms); } catch (final Exception e) { logger.warn("Failed to set permissions so that only the owner can read pid file {}; "