NIFI-929 Changing permissions of nifi.pid to be readable by all, writable only by user

This closes #677

Signed-off-by: jpercivall <joepercivall@yahoo.com>
This commit is contained in:
Bryan Bende 2016-07-19 13:23:55 -04:00 committed by jpercivall
parent f1ba240326
commit 1c6d58b959
1 changed files with 3 additions and 1 deletions

View File

@ -434,8 +434,10 @@ public class RunNiFi {
try {
final Set<PosixFilePermission> 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 {}; "