how to set the default file persmission of file to "rwx"


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users how to set the default file persmission of file to "rwx"
# 1  
Old 08-29-2008
how to set the default file persmission of file to "rwx"

hi.
I want to set the default permission for ever new created file to rwxrwxrwx ..
I try umask 000 but it does't not give the execute persmission , is there any way to set the default permission for every new created file to rwxrwxrwx ..
thankx
# 2  
Old 08-29-2008
The application which creates a new file requests the permissions it wants, and if some of them are disabled in the umask, those will be stripped off. So no, there is no simple way to automatically assign 0777 permissions to all new files.
# 3  
Old 08-29-2008
thanks .....
i wan to set the default permission of every newly created file to 777 that is "rwxrwxrwx" .
there is no application that is creating or requesting files . I want to create every file with this permission . if u have idea then share..
thanks
# 4  
Old 08-29-2008
I got the same question.....but didn't find a satisfying answere. Not sure but probably the touch or vi command by defalut creates the file without execute permissions.
# 5  
Old 08-29-2008
You can set the umask in your .login, .cshrc, or .profile files, or in the system /etc/profile file (global).

Regards
# 6  
Old 08-29-2008
That doeen't work either. umask value of /etc/profile is 027 and 000 in my .profile file. But still touch is creating a file with permission 666. No execute permissions to anybody.
# 7  
Old 08-29-2008
i have set umask in etc/profile file.. and also in .profile there is umask=000.
and then i have created a new file but there is only rw-rw-rw permission set. I want to set the default permission to rwxrwxrwx .. i.e 777
if there is a method to set the default permission then reply me.
thanks

Last edited by tahir23; 08-29-2008 at 07:17 AM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies

2. Shell Programming and Scripting

Why awk print is strange when I set FS = " " instead of FS = "\t"?

Look at the following data file(cou.data) which has four fields separated by tab. Four fields are country name, land area, population, continent where it belongs. As for country name or continent name which has two words, two words are separated by space. (Data are not accurately... (1 Reply)
Discussion started by: chihuyu
1 Replies

3. UNIX for Dummies Questions & Answers

Using "mailx" command to read "to" and "cc" email addreses from input file

How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address and column 3 contains “cc” e-mail address to include with same email. Sample input file, email.txt Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies

4. Shell Programming and Scripting

How to find a file which are not ends with ".zip" and which are ends with "*.log*" or "*.out*"?

I am new to bash/shell scripting. I want to find all the files in directory and subdirectories, which are not ends with “.zip” and which are contains in the file name “*.log*” or “*.out*”. I know below command to get the files which ends with “.log”; but I need which are not ends with this... (4 Replies)
Discussion started by: Mallikgm
4 Replies

5. Shell Programming and Scripting

finding the strings beween 2 characters "/" & "/" in .txt file

Hi all. I have a .txt file that I need to sort it My file is like: 1- 88 chain0 MASTER (FF-TE) FFFF 1962510 /TCK T FD2TQHVTT1 /jtagc/jtag_instreg/updateinstr_reg_1 dff1 (TI,SO) 2- ... (10 Replies)
Discussion started by: Behrouzx77
10 Replies

6. UNIX for Dummies Questions & Answers

Unix "look" Command "File too large" Error Message

I am trying to find lines in a text file larger than 3 Gb that start with a given string. My command looks like this: $ look "string" "/home/patrick/filename.txt" However, this gives me the following message: "look: /home/patrick/filename.txt: File too large" So, I have two... (14 Replies)
Discussion started by: shishong
14 Replies

7. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

8. Shell Programming and Scripting

"sed" to check file size & echo " " to destination file

Hi, I've modified the syslogd source to include a thread that will keep track of a timer(or a timer thread). My intention is to check the file size of /var/log/messages in every one minute & if the size is more than 128KB, do a echo " " > /var/log/messages, so that the file size will be set... (7 Replies)
Discussion started by: jockey007
7 Replies

9. Shell Programming and Scripting

How to cut a file using " ", but fields can be separated with more than one " "

Hello, let's say I have a text file: word11 word12 word13 word21 word22 word23 word31 word32 word33 and I want to put the second field of each line into a list: set list = `cut -d" " -f2 ${1}` and I use space (" ") as a delimiter, only that there's a catch: there can be more than... (12 Replies)
Discussion started by: shira
12 Replies

10. Programming

Differece between "env" and "set" command

Hi, Please clarify what is the difference between "env" and "set" command. I guess set will display the system variables and user defined variables. Thanks Sweta (1 Reply)
Discussion started by: sweta
1 Replies
Login or Register to Ask a Question