[root@ test_project]$ touch test.txt
[root@ test_project]$ ll test.txt
-rw-rw-r-- 1 root root 0 2011-08-03 13:57 test.txt
Currently it seems to be 664
,how can I change it to 700
?
[root@ test_project]$ touch test.txt
[root@ test_project]$ ll test.txt
-rw-rw-r-- 1 root root 0 2011-08-03 13:57 test.txt
Currently it seems to be 664
,how can I change it to 700
?
You can use the umask command to change the file creation mask. This though only masks bits. If the application creating the file does not request a bit to be set then umask wont set it. With a
umask 077
then files will generally be created600
and directories700
You can set your default umask in your $HOME/.profile
You want to use
umask
I think you'll need to chmod u+x still.
sente@oslo: $ help umask
: