System Default Umask in AIX

Posted on 2009-04-28
Last Modified: 2013-11-17
how to System Default Umask in AIX , and how to modify for individual
Question by:prashantchauhan
    LVL 40

    Accepted Solution

    I think the default is 022 and you can use the umask command in the users' profiles files to change it.

    e.g. if a user is using sh or ksh then in the user home dir edit the .profile file and add

    umask newmask
    LVL 68

    Assisted Solution

    you can set a system wide default umask in /etc/profile
    The value of the umask is subtracted from a default value, which is 777 for directories and 666 for files.  
    The default is 022, which leads to permissions 755 for newly created directories and 644 for newly created files.
    As omarfarid wrote, to modify an individual user's umask, add (or change) the appropriate umask statement in the ~/.profile file of the concerned user.
    umask 002
    to have newly created files and directories group-writeable.
    LVL 40

    Assisted Solution

    I some how do not agree on the statement

    "The value of the umask is subtracted from a default value, which is 777 for directories and 666 for files"

    It is usually the tool or program that try to create a file or dir with certain permissions which are masked with umask value. Try to compile a file and see what are the a.out perms and try to touch a file and see perms.

    Author Closing Comment


    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    CPU monthly average? 12 79
    sddpcm 1 60
    Best way to handle awk return value 6 60
    Unix Command -- Challenging  question 7 66
    Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
    Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
    Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
    Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

    734 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

    24 Experts available now in Live!

    Get 1:1 Help Now