UMASK(1)
β¨ UMASK(1) β set or get the file creation mode mask, fish-shell edition β¨
okay so this is the fish-shell manual page for UMASK(1), and we are literally about to make the file creation mode mask make sense. bestie, grab a strawberry π.
β¨ NAME β¨
umask β set or get the file creation mode mask. slay.
π¦ SYNOPSIS π¦
umask [OPTIONS] [MASK]
πΈ DESCRIPTION πΈ
NOTE: this page documents the fish builtinumask. to see the documentation on any non-fish versions, usecommand man umask. iykyk.
umask displays and manipulates the "umask", aka the file creation mode mask, which is used to restrict the default access to files. it's giving gatekeeper but for permissions.
the umask can be expressed either as an octal number, which represents the rights that will be removed by default, or symbolically, which represents the only rights that will be granted by default. two vibes, same mask.
access rights are explained in the manual page for the chmod(1) program β go read that if you need the full lore.
with no parameters, the current file creation mode mask is printed as an octal number. no args? it just spills the octal number, periodt.
the option squad is:
-S,--symbolicβ prints the umask in symbolic form instead of octal form. cute.-p,--as-commandβ outputs the umask in a form that may be reused as input. recycling icon behavior.-h,--helpβ displays help about using this command. bestie support line.
if a numeric mask is specified as a parameter, the current shell's umask will be set to that value, and the rights specified by that mask will be removed from new files and directories by default. heads up: numeric = the stuff you're taking away.
if a symbolic mask is specified, the desired permission bits β and not the inverse β should be specified. yes, this is the plot twist. a symbolic mask is a comma separated list of rights. each right consists of three parts:
- the first part specifies to whom this set of right applies, and can be one of
u,g,oora, whereuspecifies the user who owns the file,gspecifies the group owner of the file,ospecifies other users rights, andaspecifies all three should be changed. - the second part of a right specifies the mode, and can be one of
=,+or-, where=specifies that the rights should be set to the new value,+specifies that the specified right should be added to those previously specified, and-specifies that the specified rights should be removed from those previously specified. - the third part of a right specifies what rights should be changed and can be any combination of
r,wandx, representing read, write and execute rights.
if the first and second parts are skipped, they are assumed to be a and =, respectively. for example, r,u+w means all users should have read access and the file owner should also have write access. see? math but make it fashion. π
β οΈ note that symbolic masks currently do not work as intended. not me warning you about a real caveat β it's in the original, bestie, and i'm not hiding the tea.
π EXAMPLE π
umask 177 or umask u=rw sets the file creation mask to read and write for the owner and no permissions at all for any other users. iconic.
π Copyright π
fish-shell developers
π fish-shell manual, version 4.9, dated Sep 08, 2026 β that's the source/version and date sign-off, mwah! π«Άβ¨
π¦ where this page comes from
- arch rolling: fish 4.9.3-1 Β· GPL-2.0-only AND BSD-3-Clause AND ISC AND MIT AND PSF-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms