umask
Description:
set file mode creation mask (umask)
This function sets the mask used for creating new files and device nodes to "mask & 0777".
Typical umask values would be @022 which creates new files with permissions like "-rw-r--r--" or "-rwxr-xr-x", and @002 which creates new files with permissions like "-rw-rw-r--" or "-rwxrwxr-x".
The default umask is @022. This is important because it means that directories and device nodes will be created with @0644 or @0755 mode even if you specify @0777.
See also get_umask, umask(2), mknod, mkdir.
This call returns the previous umask.
Parameters:
this |
A GuestfsSession object |
Returns:
the returned value, or -1 on error |