The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
changing /cn@0:console file permissions ErnieG Security 4 12-04-2007 05:39 AM
changing permissions on a 444 file (ie chmod 444) ajcannon UNIX for Dummies Questions & Answers 1 08-31-2007 07:48 AM
Changing file permissions FredSmith UNIX for Dummies Questions & Answers 7 05-17-2006 05:15 AM
Changing file permissions on upload guix UNIX for Advanced & Expert Users 6 07-13-2004 01:37 PM
changing file permissions gagansharma Shell Programming and Scripting 0 11-27-2001 08:26 PM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1  
Old 12-16-2005
Registered User
 

Join Date: Sep 2005
Posts: 85
changing default file permissions

How can I change the default permissions that are assigned when I create a file? (By default the file has: -rw-r--r-- ..... I'd like it to be -rw-r-----

How can I change this default behavior?
Reply With Quote
Forum Sponsor
  #2  
Old 12-16-2005
Registered User
 

Join Date: Feb 2005
Location: Broomfield, CO
Posts: 401
Quote:
Originally Posted by FredSmith
How can I change the default permissions that are assigned when I create a file? (By default the file has: -rw-r--r-- ..... I'd like it to be -rw-r-----

How can I change this default behavior?
man umask

Carl
Reply With Quote
  #3  
Old 12-17-2005
Registered User
 

Join Date: Nov 2005
Posts: 29
try this
$chmod 644
Reply With Quote
  #4  
Old 12-18-2005
bhargav's Avatar
Registered User
 

Join Date: Sep 2004
Location: USA
Posts: 511
put the following in .profile

Code:
umask  026
Reply With Quote
  #5  
Old 12-27-2005
Registered User
 

Join Date: Sep 2005
Posts: 85
I put umask 077 (the permissions that I want, RWX for owner, nothing for group or all) in the .profile.

But after I logout and log back in, it's as if it is not working. Is .profile the correct file to put this line into?
Reply With Quote
  #6  
Old 12-27-2005
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,613
You need to put the line in the startup file for whatever shell you are using. That way, when your shell starts after you login, it will set the umask. .profile is a common name for the startup file. But we need to know what shell you use to be sure.
Reply With Quote
  #7  
Old 12-27-2005
Registered User
 

Join Date: Sep 2005
Posts: 85
echo $SHELL
/bin/ksh


Thanks!
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 10:15 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0