Issue
when ever i create new file into my dir its get new permission like
-rw-r--r-- 1 root root 0 Nov 27 2013 file.txt
while my existing old file looks like
-rwxr-xr-x 1 root root 149200683 Nov 27 15:46 data.tar.gz
how to make any new created file take same permission as data.tar.gz without doing manually ,
my file locate at , /var/data/disk1/
Solution
You can setup umask in /etc/bashrc or /etc/profile file for all users. Edit /etc/profile or ~/.bashrc file and add the following line:
umask 022
Save it, logout and login again
Answered By - gino pilotino