Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have set the umask to 0.
So:

$umask   
0000  

I do
echo 'test' > test.txt
And test.txt is created. If I do: ls -l test.txt I see:
$ls -l test.txt
-rw-rw-rw- 1 jim None 5 Jun 30 22:50 test.txt
Why aren't the rights rwxrwxrwx?

share|improve this question
1  
The shell doesn't set the x bit for newly created files. –  ott-- Jun 30 '13 at 23:50

1 Answer 1

up vote 4 down vote accepted

The shell uses 0666 for the default permissions when creating a new file. As umask only removes permissions, never adds them, that is what the resultant file will have.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.