The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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 08:39 AM
changing permissions on a 444 file (ie chmod 444) ajcannon UNIX for Dummies Questions & Answers 1 08-31-2007 10:48 AM
Changing file permissions FredSmith UNIX for Dummies Questions & Answers 7 05-17-2006 08:15 AM
Changing file permissions on upload guix UNIX for Advanced & Expert Users 6 07-13-2004 04:37 PM
changing file permissions gagansharma Shell Programming and Scripting 0 11-27-2001 11:26 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 12-16-2005
FredSmith FredSmith is offline
Registered User
  
 

Join Date: Sep 2005
Posts: 88
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?
  #2 (permalink)  
Old 12-16-2005
BOFH BOFH is offline Forum Advisor  
Registered User
  
 

Join Date: Feb 2005
Location: Broomfield, CO
Posts: 406
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
  #3 (permalink)  
Old 12-17-2005
shafique shafique is offline
Registered User
  
 

Join Date: Nov 2005
Posts: 30
try this
$chmod 644
  #4 (permalink)  
Old 12-18-2005
bhargav's Avatar
bhargav bhargav is offline Forum Advisor  
Registered User
  
 

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

Code:
umask  026
  #5 (permalink)  
Old 12-27-2005
FredSmith FredSmith is offline
Registered User
  
 

Join Date: Sep 2005
Posts: 88
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?
  #6 (permalink)  
Old 12-27-2005
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,111
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.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 02:20 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0