LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-12-2003, 05:09 PM   #1
cthorsen
LQ Newbie
 
Registered: Aug 2003
Posts: 3

Rep: Reputation: 0
Unhappy undoing umask


Help! I know umask subtracts default permissions from new files that will be created, but how do you reverse that? How can I ADD default permissions to new files that will be created?
 
Old 08-12-2003, 07:34 PM   #2
Skyline
Senior Member
 
Registered: Jun 2003
Distribution: Debian/other
Posts: 2,104

Rep: Reputation: 45
Umask creates a filter of permissions for all new files created within a certain partition - So to add "default" permissions for all new files within a certain partition add a umask value to the options section of /etc/fstab regards the relevant partition.

(In the process of "subtracting" default permissions umask leaves some behind - the permissions left behind become the default permissions)

( Chmod is the "inverse" of Umask - Chmod can be used to change the permissions on an individual file - however - for your scenario - you need Umask - Umask is used to create default permissions for all new files. )

Last edited by Skyline; 08-12-2003 at 07:46 PM.
 
Old 08-12-2003, 11:26 PM   #3
cthorsen
LQ Newbie
 
Registered: Aug 2003
Posts: 3

Original Poster
Rep: Reputation: 0
Unhappy Undo umask settings

Skyline, thanks for the help, but I guess I asked the question wrong. How do I undo an umask setting once I've set it? I set umask to a permission level I didn't mean to, and I'd like to go back to the default before I set umask.
 
Old 08-12-2003, 11:28 PM   #4
Skyline
Senior Member
 
Registered: Jun 2003
Distribution: Debian/other
Posts: 2,104

Rep: Reputation: 45
How and where did you set the umask setting and what does it apply to?
 
Old 08-12-2003, 11:37 PM   #5
cthorsen
LQ Newbie
 
Registered: Aug 2003
Posts: 3

Original Poster
Rep: Reputation: 0
In /root I issued the command: umask 777, and now when I touch new files in the root's home they all have ---------- permissions.
 
Old 08-13-2003, 12:49 AM   #6
Skyline
Senior Member
 
Registered: Jun 2003
Distribution: Debian/other
Posts: 2,104

Rep: Reputation: 45
umask=777

will give no permissions to anyone

whereas

umask=022

will give the "owner" Read Write Execute
group - Read and execute
other - Read and execute

This is a more suitable default umask setting

AFIK to make a general change to the default umask setting for all new files and directories youd need to change the setting in /etc/profile or .cshrc or your .login file.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Undoing a dual boot win2k/fedora core2 d3funct Linux - General 1 07-14-2005 10:32 AM
Undoing a dual boot system..? ZingSter SUSE / openSUSE 2 04-12-2005 02:59 AM
Help in undoing my first SSL oops. Apache No go. leongoogs Linux - Security 4 05-29-2004 04:42 PM
Undoing a Kernel Installation bezaleel Fedora 4 01-13-2004 07:18 AM
undoing a 'make install'... pdmackenzie Linux - Software 10 01-03-2003 11:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:33 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration