LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-13-2012, 10:51 AM   #1
Nick_C
Member
 
Registered: Jan 2012
Location: London, England, UK
Distribution: CentOS 6, CentOS 7
Posts: 297

Rep: Reputation: Disabled
default fmask, dmask, umask


Can anyone tell me what the default values are for fmask, dmask, umask and how can I change these default values. How can I read what the current values are for a particular mount?

Thanks,
Nick
 
Old 05-14-2012, 08:29 AM   #2
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1060Reputation: 1060Reputation: 1060Reputation: 1060Reputation: 1060Reputation: 1060Reputation: 1060Reputation: 1060
UMASK is usually set system-wide somewhere in /etc; on my systems it is set in the file login.defs:
Code:
# Default initial "umask" value.
# UMASK is also used by useradd and newusers to set the mode of new home
# directories.
# 022 is the default value, but 027, or even 077, could be considered
# better for privacy. There is no One True Answer here: each sysadmin
# must make up her mind.
UMASK           022
You can see the UMASK value with the shell built-in:
Code:
prompt: umask
0022
This default value is, generally, the "right" one for most purposes in that directories are created with drwxr-xr-x and files are created with -rw-r--r-- (what you see when you do a long listing with ls -l). The owner of either a file or directory has full read-write, the group can read and public can read. You can fiddle with UMASK system-wide (not such a good idea) or on a user-by-user basis in their individual .profile files (when they log in UMASK is set for their session). Be sure and read the umask manual page for what and how to do that.

fmask and dmask default to the value of UMASK of the current process (see the manual page for mount), fmask and dmash can be optionally set by mount.

Hope this helps some.
 
Old 05-14-2012, 10:53 AM   #3
Nick_C
Member
 
Registered: Jan 2012
Location: London, England, UK
Distribution: CentOS 6, CentOS 7
Posts: 297

Original Poster
Rep: Reputation: Disabled
Thanks tronayne, UMASK setting in /etc/login.defs now found, that is set to 077. However 'umask' returns: 0002. Not sure how that relates to the default fmask & dmask though.

Cheers,
Nick
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
dmask=,fmask=,umask= ARGHHHHHHH mickboda Linux - General 3 02-21-2019 06:17 AM
HAL and fmask dmask in automounting ntfs-3g drives duryodhan Slackware 2 09-23-2008 02:42 PM
getting fat32 (Win98SE) part to mount with dmask and fmask options Simon Bridge Linux - General 3 06-22-2005 01:50 AM
smbmnt,fmask=,dmask=,umask= ARRGGHHH mickboda Linux - Networking 3 12-23-2004 05:04 PM
umask,dmask,fmask mmm Linux - General 1 08-14-2003 12:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:16 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration