LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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, 06: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, 08: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 08:46 PM.
 
Old 08-13-2003, 12:26 AM   #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-13-2003, 12:28 AM   #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-13-2003, 12:37 AM   #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, 01: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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 11:32 AM
Undoing a dual boot system..? ZingSter SUSE / openSUSE 2 04-12-2005 03:59 AM
Help in undoing my first SSL oops. Apache No go. leongoogs Linux - Security 4 05-29-2004 05:42 PM
Undoing a Kernel Installation bezaleel Fedora 4 01-13-2004 08:18 AM
undoing a 'make install'... pdmackenzie Linux - Software 10 01-04-2003 12:32 AM

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

All times are GMT -5. The time now is 09:05 AM.

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