-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
Description
Component
nohup
Description
The uutils nohup creates nohup.out using default file creation permissions (i.e. 0666 & ~umask). With a common umask like 022, this results in 0644 (world-readable).
In contrast, GNU coreutils nohup is expected to create nohup.out as owner-only (typically 0600) when it has to create the file.
This matters on multi-user systems where jobs might log sensitive data. Other users can read the file when they shouldn't be able to.
Reproduction
# uutils nohup
umask 022
nohup sh -c 'echo secret_data' && sleep 1 && ls -l nohup.out
# -rw-r--r-- (0644) # typical, depends on umask and directory permissions
# GNU nohup
umask 022
nohup sh -c 'echo secret_data' && sleep 1 && ls -l nohup.out
# -rw------- (0600) # expected GNU behavior when creating nohup.out