|
Any rules for the new files (including folders) Linux-based operating system adds the default permissions. For educational purposes, here are some that can be used to set file permissions mask octal values:
0- read, write, execute (rwx)
1- read and write (rw-)
2- Reading and executable (r-x)
3- read-only (r--)
4- write and executable (-wx)
5- Write Only (-w-)
6- only executable (--x)
7- no authority (---)
Umask default values in almost all Linux distributions is 0022 (or 022), you can enter umask command in a terminal emulation program to view. You can also run "umask octal value mask" command (for example, umask 027) to temporarily change this value.
As you probably know, the default permissions of new files created was supposed to be 0666, the folder is 0777. The application of the above mentioned umask value obtained after 644 and 755 permissions.
Many expressed that 022 masks will bring privacy issues, meaning that the file you create other user is free to view, I thought this was very cool!
Closer to home, the user can press their wish to modify the default value of Umask, of course, we must first ensure that the modified values legitimate. To modify the default values, write a new Umask values in your shell configuration file or / etc / profile file.
Well, this done! From now on, the file or files on your Linux system, the newly created folder will have the permissions set correctly. However, please note the permissions for files or folders that already exist and will not be changed because of the above operations.
If you are using the command line, you can run the command ls -lah in any directory, you can see the current file permissions. In addition, the novice can easily view the file permissions, based on the GNOME desktop environment by right-clicking the file, select Properties -> Permissions tab. |
|
|
|