mirror of https://github.com/apache/nifi.git
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:
parent
f1ba240326
commit
1c6d58b959
|
@ -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 {}; "
|
||||
|
|
Loading…
Reference in New Issue