What UNIX command will control the default file permissions
when files are created?
Answers were Sorted based on User's Feedback
Answer / indrajit bhaga / manoj jayswal
"umask <filename>" command is use to see default file
permissions or creat default file permissions.
Is This Answer Correct ? | 18 Yes | 1 No |
Answer / aks
for this purpose we need to use umask command...
as by default every file has default permissions of 666
and any directory have the dafault ermission of 777...
syntax: $ umask [umask options]
as it works with octal method only so
1 for execute
2 for write
4 for read
example:
$ umask
using umask alone will allow u to see the default permisions..
Is This Answer Correct ? | 5 Yes | 1 No |
why unix operating system provides more security than other operating systems?
What does 'mkdir' command do in UNIX?
what is Online(STM) and offline diagnostics in HP-UX?
What does the “echo” command do?
What are the differences among a system call, a library function, and a unix command?
Sorry to all Technical person for mistake of Question. Now i am post currect question Why copied file permission is changed in destination. When i give all permission i.e 777 to file and copy that to other location in destination the permission is 755. But if give permission 555 in destination that file permission is 555 and if give permission 444 to file after copy in destination the file permission is 444. These all are happening in normal user. How the umask value is calculate here really i am not understand. Please write the proper answer. Thanks in Advance
What is pid?
write grep commands to select the lines that have exactly two characters
What do chmod, chown, chgrp commands do?
What is the difference between cat command and more command?
distinguish between interrupts and exceptions?
What does find command return in unix?