メインコンテンツまでスキップ
バージョン:25.2

umask

  • global property
  • Global property the umask allows you to retrieve or set the posix permissions mask for newly created files. The mask is a 3-digit number: the digits control file permissions for the user, the group, and others, respectively. Each digit is a number from 0 to 7 indicating the permissions that will be blocked, with 4 blocking read permission, 2 blocking write permission, and 1 blocking execute permission. The values may be added together to block more than one permission:
         put the umask into origMask
set the umask to 247
create file "/tmp/permissionsTest"

    set the umask to origMask -- restore it to its original value

    In the example above, the file will be created with write access blocked for the user (but they will be able to read the file), with read access blocked for members of the group, and with all access blocked for others.

  • Related: create file, file