answersLogoWhite

0


Best Answer

a bit mask is the subtracted value that would allow you to obtain the actual file permission.

For example,

consider that a file permission of 777 gives everyone full permissions

You want the default file permission for all files created to be 755

You would then set your umask value to 022

Think about it in binary. File permissions consist of three 3-bit numbers, whose values can range from 000 (decimal 0) to 111(decimal 7)

111 111 111 (full permissions, or, 777)

-000 010 010 (subtract bit mask of 022)

-------------------

111 101 101 (actual file permissions 755)

your default bit mask on linux is set in either /etc/bashrc or /etc/profile. If you want to set it for a single person, you could do it in your .bashrc or .profile in your home directory.

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Are file permissions considered a bit mask?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you identify executable files in Linux?

Open a terminal, browse to the directory where the files are, and run the command "ls -l". On the left-most side there will read something that looks like -rwx-. "r" means readable, "w" means writable, and "x" means that the file is executable. If the "x" is not there, then the file is not executable.


A wildcard mask bit x means check the corresponding bit value while a wildcard mask bit y means ignore that corresponding bit value?

x -> 0 y -> 1


What is the Linux command that is used to change the access permissions of a file by a adding or removing permissions?

For said purpose, you should use chmod command. Its very helpful, powerful and easy to use. Here is the brief description for chmod command.Commandchmod (Change Mode) SYNOPSISchmod [OPTION]... MODE[,MODE]... FILE... chmod [OPTION]... OCTAL_MODE FILE... chmod [OPTION]... --reference=RFILE FILE... DESCRIPTIONThis manual page documents the GNU version of chmod. chmod changes the permissions of each given file according to mode, which can be either a symbolic representation of changes to make, or an octal number representing the bit pattern for the new permissions. The format of a symbolic mode is `[ugoa...][[+-=][rwxXs­ tugo...]...][,...]'. Multiple symbolic operations can be given, separated by commas. A combination of the letters `ugoa' controls which users' access to the file will be changed: the user who owns it (u), other users in the file's group (g), other users not in the file's group (o), or all users (a). If none of these are given, the effect is as if `a' were given, but bits that are set in the umask are not affected. The operator `+' causes the permissions selected to be added to the existing permissions of each file; `-' causes them to be removed; and `=' causes them to be the only permissions that the file has. The letters `rwxXstugo' select the new permissions for the affected users: read (r), write (w), execute (or access for directories) (x), execute only if the file is a direc­ tory or already has execute permission for some user (X), set user or group ID on execution (s), save program text on swap device (t), the permissions that the user who owns the file currently has for it (u), the permissions that other users in the file's group have for it (g), and the permissions that other users not in the file's group have for it (o). A numeric mode is from one to four octal digits (0-7), derived by adding up the bits with values 4, 2, and 1. Any omitted digits are assumed to be leading zeros. The first digit selects the set user ID (4) and set group ID (2) and save text image (1) attributes. The second digit selects permissions for the user who owns the file: read (4), write (2), and execute (1); the third selects permis­ sions for other users in the file's group, with the same values; and the fourth for other users not in the file's group, with the same values. is not a problem since the permissions of symbolic links are never used. However, for each symbolic link listed on the command line, chmod changes the permissions of the pointed-to file. In contrast, chmod ignores symbolic links encountered during recursive directory traversals. OPTIONS-c, --changes like verbose but report only when a change is made -f, --silent, --quiet suppress most error messages -v, --verbose output a diagnostic for every file processed --reference=RFILE use RFILE's mode instead of MODE values -R, --recursive change files and directories recursively --help display this help and exit --version output version information and exit Each MODE is one or more of the letters ugoa, one of the symbols +-= and one or more of the letters rwxXstugo. Reference URL : http://lowfatlinux.com/linux-chmod-manual.html


Why is spidermans mask red?

Because spiderman mask is red.


What is the purpose of the setuid bit on a Linux file?

setuid is a unix access rights flag that allow users to run an executable file with the permissions of the executable's owner and to change behavior in directories. These (setuid and setgid) are often used to allow users on a computer to run programs with temporarily elevated privileges in order to perform specific tasks.


What does a bit that is set to 0 in an ip subnet mask specify?

the corresponding bit in the ip address is a host bit


Bit depth does not affect file size?

Actually, Bit depth will affect file size. For example: 1-bit=2kb 4-bit=21kb 24-bit=24kb


What is the round bit on a gas mask?

The air-filtration intake filter.


What actors and actresses appeared in The Face Behind the Mask - 1938?

The cast of The Face Behind the Mask - 1938 includes: Carlos De Valdez as Bit Part Jack Deery as Bit Part Ivo Henderson as Bit Part Edward Keane as Nicholas Fouquet Michael Mark as Peasant Andre Marsaudon as Bit Part John Nesbitt as Narrator Leonard Penn as Louis XIV, The Man in the Iron Mask George Sorel as Count Mattioli Lyons Wickland as The Mask Harry Worth as Louis XIII


How do you devolop passport authentication using aspnet?

How can I get a batch file (that calls on an executable file and a .fil file) that is made for a 32 bit application to work on a 64 bit win 7?


What is port 6911?

It is Used for bit torrent P2P File Sharing, Bit torrent uses Ports 6902 - 6968 For File Data Transfer.


What are the file organization terms and concepts?

Bit, Byte, Field, Record, File, Database.