Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

 E-mail Us
 Oracle Articles
New Oracle Articles

 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog

 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Oracle Support

 SQL Tuning

 Oracle UNIX
 Oracle Linux
 Remote s
 Remote plans
 Application Server

 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S


 Consulting Staff
 Consulting Prices
 Help Wanted!


 Oracle Posters
 Oracle Books

 Oracle Scripts

Don Burleson Blog 









Change Default File Permissions with umask

Oracle UNIX/Linux Tips by Burleson Consulting


Change default file permissions with umask

As we noted in Chapter 1, the umask and chmod commands are often used by the Oracle DBA to allow other UNIX users the ability to read and execute Oracle files.

For example, if we want to create a file with read-write permission for the Oracle user and ready-only permissions for everybody else, we can set the umask to 022:

root> umask 022
root> umask

root> touch dumpfile.trc

root> ls -al dumpfile.trc

-rw-r--r--   1 oracle   dba            0 Aug 13 09:36 dumpfile.trc

Setting Default Permissions Using a File Mask

By default, Linux permissions for new directories are typically set to 755 allowing read, write, and execute permissions to user and only read and execute to group and other users.  Conversely, file permissions default to 644 allowing read and write access to user but only read to group and others.  These defaults are controlled by the user file-creation mask or umask.

A user or administrator may want to change the Linux default permissions by using the umask command in a login script.  The umask command can be used without specifying any arguments to determine what the current default permissions are.  The value displayed by umask must be subtracted from the defaults of 777 for directories and 666 for files to determine the current defaults.  A typical umask which will generate the permissions listed in the previous paragraph would be 0022.  The first digit pertains to the sticky bit which will be explained further later in this section.

The ?S option can be used to see the current default permissions displayed in the alpha symbolic format.  Default permissions can be changed by specifying the mode argument to umask within the user?s shell profile (.bash_profile) script.

The following are some examples.

Using umask to Set Default Permissions

$ umask

$ umask -S

$ umask 033

$ umask

$ umask -S

The default umask will cause users to create files which any user can read.  In many instances where you have a multi-user system this is not desirable and a more appropriate umask may be 077.  That umask will enforce the default permissions to be read, write and execute for the owner and no permissions for the group and other users.

Special modes

There are a few special permission mode settings that are worthy of noting.  Table 6.3 below contains a few of these special settings.



If you like Oracle tuning, see the book "Oracle Tuning: The Definitive Reference", with 950 pages of tuning tips and scripts. 

You can buy it direct from the publisher for 30%-off and get instant access to the code depot of Oracle tuning scripts.


Oracle Training at Sea
oracle dba poster

Follow us on Twitter 
Oracle performance tuning software 
Oracle Linux poster


Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  

and include the URL for the page.


Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


Copyright © 1996 -  2017

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.

Remote Emergency Support provided by Conversational