Results 1 to 4 of 4

Thread: What is meant by UMASK

  1. #1
    Join Date
    Apr 2009
    Posts
    569

    What is meant by UMASK

    Hi,,,

    I have a very small query. Regarding to my younger brother's studies that need to work on Unix file permissions, he got a confusing word that is UMASK. Now i also heard this word for the first time.

    Could you guys please make me know what is meant by UMASK ? Thanks in advance.

  2. #2
    Join Date
    Apr 2008
    Posts
    3,267

    Re: What is meant by UMASK

    UMASK is a command and a function in POSIX environments that sets the file mode creation mask of the current process. It is a Unix environment variable which automatically sets file permissions on newly created files.

    UMASK is a four-digit octal number that can be used to control the default file permission for new files. umask() sets PHP's umask to mask & 0777 and returns the old umask. When PHP is being used as a server module, the umask is restored when each request is finished.

  3. #3
    Join Date
    Nov 2005
    Posts
    3,026

    Re: What is meant by UMASK

    Umask sets the mask applied to newly created file and directory permissions within a given context. It specifies the permissions you do not want given by default to newly created files and directories. umask works by doing a bitwise AND with the bitwise complement of the umask. Bits that are set in the umask correspond to permissions that are not automatically assigned to newly created files.The UMASK variable can be confusing to use, because it does work as a mask. In other words, you set the permissions that you do not want in the UMASK.

  4. #4
    Dr. V Guest

    Re: What is meant by UMASK

    UMASK only restricts permissions and cannot grant extra permissions beyond what is specified by the program that creates the file or directory.You can setup umask in /etc/bashrc or /etc/profile file for all users. umask() without arguments simply returns the current umask otherwise the old umask is returned.By default, the Umask in the server configuration, <VirtualHost> or <Anonymous> block is used, unless overridden by a "per-directory" Umask setting.

Similar Threads

  1. Umask understanding
    By Edwards in forum Operating Systems
    Replies: 4
    Last Post: 24-04-2010, 03:27 AM
  2. What is meant by BD+
    By Brooks in forum Windows Software
    Replies: 3
    Last Post: 05-09-2009, 06:11 PM
  3. What is meant by UDP
    By Jacques25 in forum Networking & Security
    Replies: 3
    Last Post: 21-08-2009, 11:31 PM
  4. What is meant by IP class
    By nooob in forum Networking & Security
    Replies: 3
    Last Post: 14-08-2009, 05:37 PM
  5. What is meant by Free to Air
    By Mansi gala in forum Off Topic Chat
    Replies: 3
    Last Post: 13-08-2009, 08:35 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,750,253,824.13642 seconds with 16 queries