6 = read and write (common) 7 = read, write and execute (common)...

Linki


» Dzieci to nie książeczki do kolorowania. Nie da się wypełnić ich naszymi ulubionymi kolorami.
»
long as Hagrid keeps his head this time, and argues his case properly,they can't possibly execute Buckbeak...
»
NOTE: PL/SQL script files can be executed using the START command or the character @...
»
sleep( ) to cease execution for a given number of milliseconds...
»
Overview Almost all databases provide the user with a series of common functions...
»
Action Rewrite the trigger or function so it does not read the table...
»
kowskim z przepisów prawa wspólnotowego w zakresie swobodnego prze- członkowskie jego języka urzędowego i jego tradycji”...
»
1
»
– Wiesz, to jest wózek...
»
była w stanie uchronić franka przed stopniową dewaluacją...
»
Jack kiwnął głową...

Dzieci to nie książeczki do kolorowania. Nie da się wypełnić ich naszymi ulubionymi kolorami.


The permission for all three classes of users (owner, group, others) is obtained by gluing the three digits together one by one. For example, the command
chmod 770 junk
will give the owner and the group the completto of permissions, but no permissions to others. The command:
chmod 666 junk
gives all three classes of users (owner, group, others) the permissions to read and write (but not execute) the example file named "junk". Please note the "666". It is quite often used and, for at least one person I know, it is proof that Linux (any UNIX for that matter) is the work of the devil
>:-0.
This command:
chmod 411 junk
would give the owner the permission to read only, and the group and others to execute only. This one does not seem useful, but might be funny, at least for those North American Linux users who dial 411 (telephone number) for directory assistance. Mail me if you can think of any other funny permissions (perhaps 007?).
The numerical way of representing file permissions is called "octal" because the numbers have the base 8 (the decimal system’s base is 10). The highest digit in the octal system is 7 (the octal system has eight digits: 0 to 7, analogous to the decimal system having ten digits: 0 to 9). The octal representation is really a convenient notation for the binary representation of file permissions, where each permission is flagged as "set" or "denied" with a one or zero and the 57
total is represented as a string of zeroes and ones, as in this diagram: user class: owner group
others
example permissions: rwx rw- r--
absent permissions: --- --x -wx
binary representation of the permissions: 111 110 100
octal representation of the binary: 7 6 4

Permissions for directories.
The meaning of the permissions is different for directories than it is for "normal" files. For normal files: r=permission to read the contents of the file, w=permission to modify the contents of the file, and x=permission to execute the file.
For directories: r=permission to list the filenames in the directory, w=permission to create or delete files in the directory, and x=permission to access the directory. Otherwise, the permissions are set the same way for directories as they are for normal files.
Default file permissions with umask. When a new file is created, it is given default permissions. On my system, these are:
-rw-r--r--
This means that files created by a user can be read and written by this user; the group and the others can only read the file. Still, on my default RedHat system, users cannot read the files in the other users’ home directories because the permissions on the home directories are: drwx------
I can check the default file permissions given to my newly created files using:
umask -S
(The option "-S" stands for "symbolic" and tells umask to display the permissions in an easy-to-read form, instead of the default numeric mode.)
I can change the default file permissions for newly created files using a command like: umask u=rw,g=,o=
which will give the owner the read and write permissions on newly created files (r+w), and no permission to the group and others.
Using numbers to set default permissions with umask is more tricky. The number shows the permissions that you take away for users (opposite to chmod). Thus:
umask 000
will give full permissions to everybody on newly created files. The next example gives read and write permissions to the owner, and zero permissions for everybody else (seems that’s what one might want):
58
umask 177
To make the settings permanent for all users on the system, adjust the appropriate line(s) in the file /etc/profile .
3.2.7 My mp3 player chokes. The sound is kind of interrupted (how to
set suid).

Powered by MyScript