Unix/Linux Go Back    


UNIX for Dummies Questions & Answers This forum is closed for new posts. Please post beginner questions to learn unix and learn linux in this forum UNIX for Beginners Questions & Answers

File Permision

UNIX for Dummies Questions & Answers


 
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 05-16-2007   -   Original Discussion by sommyp
sommyp sommyp is offline
Registered User
 
Join Date: May 2007
Last Activity: 16 May 2007, 7:57 AM EDT
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
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
Sponsored Links
    #2  
Old Unix and Linux 05-16-2007   -   Original Discussion by sommyp
OSLEVEL OSLEVEL is offline
Registered User
 
Join Date: May 2007
Last Activity: 1 September 2008, 2:25 AM EDT
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Use the umask command

Hi,

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

Have fun.
Sponsored Links
    #3  
Old Unix and Linux 05-16-2007   -   Original Discussion by sommyp
sommyp sommyp is offline
Registered User
 
Join Date: May 2007
Last Activity: 16 May 2007, 7:57 AM EDT
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
The umask is already set 022.

svrark-himms02:/home/spatra/myjava> umask
022
    #4  
Old Unix and Linux 05-16-2007   -   Original Discussion by sommyp
blowtorch's Unix or Linux Image
blowtorch blowtorch is offline Forum Advisor  
AFK
 
Join Date: Dec 2004
Last Activity: 1 July 2016, 6:18 AM EDT
Location: UK
Posts: 2,351
Thanks: 0
Thanked 6 Times in 6 Posts
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.
Sponsored Links
    #5  
Old Unix and Linux 05-17-2007   -   Original Discussion by sommyp
arunkumar_mca arunkumar_mca is offline
Registered User
 
Join Date: Oct 2004
Last Activity: 23 November 2017, 9:23 AM EST
Posts: 395
Thanks: 61
Thanked 2 Times in 2 Posts
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.
Sponsored Links
    #6  
Old Unix and Linux 05-17-2007   -   Original Discussion by sommyp
matrixmadhan matrixmadhan is offline Forum Advisor  
Technorati Master
 
Join Date: Mar 2005
Last Activity: 10 January 2017, 8:10 AM EST
Location: classification algos
Posts: 3,215
Thanks: 19
Thanked 31 Times in 28 Posts
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
Sponsored Links
    #7  
Old Unix and Linux 05-17-2007   -   Original Discussion by sommyp
Perderabo's Unix or Linux Image
Perderabo Perderabo is offline Forum Advisor  
Unix Daemon (Administrator Emeritus)
 
Join Date: Aug 2001
Last Activity: 26 February 2016, 12:31 PM EST
Location: Ashburn, Virginia
Posts: 9,930
Thanks: 64
Thanked 471 Times in 271 Posts
See Unix File Permissions
Sponsored Links
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
windows partition file permision vistastar UNIX for Dummies Questions & Answers 1 11-23-2011 04:39 AM
file permision chandan.sharma UNIX for Dummies Questions & Answers 1 04-27-2009 03:01 PM
Question regarding permision and seguid bit (sticky bit) arunkumar_mca UNIX for Dummies Questions & Answers 2 01-09-2008 07:18 AM
Based on the permision in the dir can i delete the file arunkumar_mca UNIX for Dummies Questions & Answers 4 01-08-2008 01:59 PM
chmod mode as permision drwxrwsr-x arunkumar_mca UNIX for Dummies Questions & Answers 2 12-05-2007 10:47 AM



All times are GMT -4. The time now is 07:52 PM.