By default, Linux and UNIX 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.

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 for the bash) script.

The following are some examples.

Using umask to Set Default Permissions

$ umask
0022

$ umask -S
u=rwx,g=rx,o=rx

$ umask 033

$ umask
0033

$ umask -S
u=rwx,g=r,o=r

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.

Easy Linux CommandsFor more tips like this check out my book Easy Linux Commands, only $19.95 from Rampant TechPress.

Buy it now!


unix, linux, umask, shell, bash, sysadmin, system administration

Andy C has posted a list of Oracle blogs he reads listed by Technorati ranking. Not only did Life After Coffee make the list, but it made #1!

Andy C posted a short history of Oracle blogging about a year ago. It seems there were a lot fewer back then.

Check out the whole list. There are some great folks on here, many of whom actually post primarily about Oracle!

oracle, database, dba, rdbms, blog

After a long battle trying to get Javascript to work in WordPress posts I finally stumbled upon the Script Enabler Plugin by Otto. In hopes of shortening the search for others and since Otto doesn’t seem to have a home page for Script Enabler (or at least not one I can find) here’s everything you need to know about it.

Features:

  • No settings
  • No configuration
  • Use standard script tag syntax
  • It works

Instructions:

  1. Download it (click here)
  2. Unzip it (Hey, I was talking about the file)
  3. Move it to your plugins directory
  4. Enable it

Thanks to Otto for developing the plugin!

information technology, blog, blogging, blogs, java, javascript, wordpress

What follows is just a small taste of the 37 page PDF which is The Tao of Oracle.

Something is mysteriously formed,
Born before heaven and Earth.
In the silence and the void,
Standing alone and unchanging,
Ever present and in motion.
Perhaps it is the source of all code and data.
I do not know its name
I therefore call it the Tao of Oracle.

Truncate your mind.
Let the SGA become still.
The ten thousand transactions rise and fall
while the rollback watches their return.
They grow and flourish and then return to the disk.
Returning to the source is stillness,
which is the way of the Tao.

The instance has crashed.
I am the ORA 600.
No one hears your screams.

The bug you seek
Is found on Metalink.
You click the reference,
but it is non-published.

Roby Sherman at Interealm Software Imagineering did this “translation” of the Tao. The only thing that could possibly make this funnier would be if version 2.1 were referred to as 3T or some other seemingly arbitrary number and letter.

via Don Burleson.

humor, oracle, dba, geek, funny

My book Easy Linux Commands: Working Examples of Linux Command Syntax has received another 5-star review on Amazon. Here’s what reviewer Ben Prusinski has to say:

After wading through a maze of complex Linux tomes that are geared toward experienced Unix administrators, I finally found an excellent tips and tricks guide that can walk a novice through the maze of Unix commands. This book is easy to follow and makes using Linux operating system a breeze rather than a painful austerity. Highly recommended!

I’m glad people are finding the book useful! Thanks for the feedback Ben.

Easy Linux CommandsCheck out Easy Linux Commands for yourself, only $19.95 from Rampant TechPress.

Buy it now!


linux, unix, linux commands, command line, redhat, ubuntu, book, technology, information technology, system administration, sysadmin

« Previous PageNext Page »