How to set umask

Posted on 2006-04-20
Last Modified: 2012-06-27
I need to change umask settings for 2 users. What is the syntax for doing this?
Question by:sikyala
    1 Comment
    LVL 3

    Accepted Solution

    Example you have 2 users "bob" and "alice"

    From root :-

    # vi  ~bob/.bashrc
    umask 0022

    Save and quit.
    Then do the same thing for alice

    # vi ~alice/.bashrc
    umask 0022

    What they will get is,
    when they create new FOLDER, permission will be
    0777 - 0022 = 0755 (drwxr-xr-x)

    when they create new FILE, permission will be
    0666 - 0022 = 0644 (-rw-r--r--)

    Good Luck,


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Introduction How to create multiboot configuration with XP\Vista and Windows 7 on it? And most important question - how to do this correctly so not to have any kind of nightmares we get when system gets screwed? First of all one should realize t…
    Windows 10 is here and for most admins this means frustration and challenges getting that first working Windows 10 image. As in my previous sysprep articles, I've put together a simple help guide to get you through this process. The aim is to achiev…
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    23 Experts available now in Live!

    Get 1:1 Help Now