File Permision


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers File Permision
# 1  
Old 05-16-2007
File Permision

Hi,

I want to know how the file permision should change to 755 automatically once the file is created. At the moment I do it explicitely by changing the permission mode to 755 using chmod command.

The default permission for a new file in my system is 644 (-rw-r--r--).

Thanks
Saumya
# 2  
Old 05-16-2007
Use the umask command

Hi,

You can set the umask to 022 in the user profile.

Have fun.
# 3  
Old 05-16-2007
The umask is already set 022.

svrark-himms02:/home/spatra/myjava> umask
022
# 4  
Old 05-16-2007
Actually, most programs will by default open the file with 666 permissions. Then the umask will come into play. Usually the umask is set to 022 (you can check your's with the 'umask' command). So your final file perms are 666-022=644. Similarly, directories will also be created with 777 and then the umask applied.
# 5  
Old 05-17-2007
That was nice to read ...

but i am having doubt is files are open withh 666 permision and then umask appiled
..
is 666 have fulle permision to do(read wript and execute) .Because when i am changing the permision to my file i am using
chmod 777 file ....
how 666 and 777 are differed ??...

Thanks in advance,
Arun.
# 6  
Old 05-17-2007
Quote:
is 666 have fulle permision to do(read wript and execute) .Because when i am changing the permision to my file i am using
chmod 777 file ....
how 666 and 777 are differed ??...

666 is not for read write and execute
It will not have execute permission

6 ==> rw-
7 ==> rwx

666 represents rw for owner group and others
777 represents rwx for owner group and others
# 7  
Old 05-17-2007
 
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Shell script (sh file) logic to compare contents of one file with another file and output to file

Shell script logic Hi I have 2 input files like with file 1 content as (file1) "BRGTEST-242" a.txt "BRGTEST-240" a.txt "BRGTEST-219" e.txt File 2 contents as fle(2) "BRGTEST-244" a.txt "BRGTEST-244" b.txt "BRGTEST-231" c.txt "BRGTEST-231" d.txt "BRGTEST-221" e.txt I want to get... (22 Replies)
Discussion started by: pottic
22 Replies

2. Shell Programming and Scripting

Compare 2 text file with 1 column in each file and write mismatch data to 3rd file

Hi, I need to compare 2 text files with around 60000 rows and 1 column. I need to compare these and write the mismatch data to 3rd file. File1 - file2 = file3 wc -l file1.txt 58112 wc -l file2.txt 55260 head -5 file1.txt 101214200123 101214700300 101250030067 101214100500... (10 Replies)
Discussion started by: Divya Nochiyil
10 Replies

3. Shell Programming and Scripting

Match list of strings in File A and compare with File B, C and write to a output file in CSV format

Hi Friends, I'm a great fan of this forum... it has helped me tone my skills in shell scripting. I have a challenge here, which I'm sure you guys would help me in achieving... File A has a list of job ids and I need to compare this with the File B (*.log) and File C (extend *.log) and copy... (6 Replies)
Discussion started by: asnandhakumar
6 Replies

4. UNIX for Dummies Questions & Answers

windows partition file permision

I hava a windows NTFS partition on fedora15. The partitions auto-mounts to /media/Data ever starting of KDE. /dev/sda5 on /media/Data type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096) But I cant change the file permission in this... (1 Reply)
Discussion started by: vistastar
1 Replies

5. UNIX for Dummies Questions & Answers

file permision

Hello, I have a program which at run time creates a shell script and tries to redirect the output of the same to another file. both of the files are created at run time with different names. The problem is: the file it is redirecting to is being created as: -rw-r--r-- 1 root tech 69... (1 Reply)
Discussion started by: chandan.sharma
1 Replies

6. UNIX for Dummies Questions & Answers

Question regarding permision and seguid bit (sticky bit)

Hi , I am having file permision as drwxrwsr_x I kwo for deleting a file in the diretory i need w permsion as well .. Say if i am having the permsion as drwxrwsrwx - wil any one can delete the files in the directory .. And one more question what is the s doing there ..... (2 Replies)
Discussion started by: arunkumar_mca
2 Replies

7. UNIX for Dummies Questions & Answers

Based on the permision in the dir can i delete the file

All, I am having a directory as drwxrwsr-x 3 intermec intermec 10240 Jan 8 09:07 intermec inside the directory . the files are like cd -rw-r----- 1 intrmc01 intermec 5226 Dec 2 15:03 AST07356.txt -rw-r----- 1 intrmc01 intermec 5025 Dec 2 12:51... (4 Replies)
Discussion started by: arunkumar_mca
4 Replies

8. UNIX for Dummies Questions & Answers

chmod mode as permision drwxrwsr-x

All, As first i searched in google but no result . Also i searched in the forum as well. I am having a directory with permision drwxrwsr-x i want to create a new directory with same permision . I know S denotes stick bit i tried to creat a directory and modify by chmod as chmod... (2 Replies)
Discussion started by: arunkumar_mca
2 Replies
Login or Register to Ask a Question