Podobne
- Strona startowa
- Linux. .Mandrake.10.Podręcznik.Użytkownika.[eBook.PL] (3)
- Linux administracja sieciami zaawansowane ( 554 strony )
- Sams' Teach Yourself Linux In 24 Hours
- Linux Network Administrators' Guide
- Linux Podręcznik Administratora Sieci
- Linux Administration Security Guide
- Linux Complete Command Reference
- Jennifer D. Keene World War I (2006)
- Moorcock Michael Saga o Elryk Zeglarz Morz Przeznaczenia
- Terry Pratchett Mundodisco 25 La Verdad
- zanotowane.pl
- doc.pisz.pl
- pdf.pisz.pl
- alba.xlx.pl
Cytat
Do celu tam się wysiada. Lec Stanisław Jerzy (pierw. de Tusch-Letz, 1909-1966)
A bogowie grają w kości i nie pytają wcale czy chcesz przyłączyć się do gry (. . . ) Bogowie kpią sobie z twojego poukładanego życia (. . . ) nie przejmują się zbytnio ani naszymi planami na przyszłość ani oczekiwaniami. Gdzieś we wszechświecie rzucają kości i przypadkiem wypada twoja kolej. I odtąd zwyciężyć lub przegrać - to tylko kwestia szczęścia. Borys Pasternak
Idąc po kurzych jajach nie podskakuj. Przysłowie szkockie
I Herkules nie poradzi przeciwko wielu.
Dialog półinteligentów równa się monologowi ćwierćinteligenta. Stanisław Jerzy Lec (pierw. de Tusch - Letz, 1909-1966)
[ Pobierz całość w formacie PDF ]
.However, on mostsystems the default is to allow other users to read your files but not modify or delete themin any way.Every file is owned by a particular user.However, files are also owned by a particulargroup, which is a defined group of users of the system.Every user is placed into at leastone group when that user s account is created.However, the system administrator maygrant the user access to more than one group.Groups are usually defined by the type of users who access the machine.For example,on a university Linux system users may be placed into the groups student, staff,facultyorguest.There are also a few system-defined groups (likebinandadmin)which are used by the system itself to control access to resources very rarely do actualusers belong to these system groups.162 Linux TutorialPermissions fall into three main divisions: read, write, and execute.These permissionsmay be granted to three classes of users: the owner of the file, the group to which the filebelongs, and to all users, regardless of group.Read permission lets a user read the contents of the file, or in the case of directories, listthe contents of the directory (usingls).Write permission lets the user write to and modifythe file.For directories, write permission lets the user create new files or delete files withinthat directory.Finally, execute permission lets the user run the file as a program or shellscript (if the file is a program or shell script).For directories, having execute permissionlets the usercdinto the directory in question.3.10.2 Interpreting file permissions.Let s look at an example that demonstrates file permissions.Using thels commandwith the-loption displays a long listing of the file, including file permissions./home/larry/foo# ls -l stuff-rw-r--r-- 1 larry users 505 Mar 13 19:05 stuff/home/larry/foo#The first field in the listing represents the file permissions.The third field is the ownerof the file (larry) and the fourth field is the group to which the file belongs (users).Obviously, the last field is the name of the file (stuff).We ll cover the other fields later.This file is owned by larry, and belongs to the group users.The string-rw-r--r--lists, in order, the permissions granted to the file s owner, the file s group,and everybody else.The first character of the permissions string ( - ) represents the type of file.A -means that this is a regular file (as opposed to a directory or device driver).The next threecharacters ( rw- ) represent the permissions granted to the file s owner, larry.The r stands for read and the w stands for write.Thus, larry has read and writepermission to the filestuff.As mentioned, besides read and write permission, there is also execute permissionrepresented by an x.However, a - is listed here in place of an x , so Larry doesn thave execute permission on this file.This is fine, as the filestuffisn t a program of anykind.Of course, because Larry owns the file, he may grant himself execute permission forthe file if he so desires.(This will be covered shortly.)File Permissions 163The next three characters, ( r-- ), represent the group s permissions on the file.Thegroup that owns this file is users.Because only an r appears here, any user whobelongs to the groupusersmay read this file.The last three characters, also ( r-- ), represent the permissions granted to every otheruser on the system (other than the owner of the file and those in the groupusers).Again,because only an r is present, other users may read the file, but not write to it or executeit.Here are some other examples of permissions:-rwxr-xr-x The owner of the file may read, write, and execute the file.Users in thefile s group, and all other users, may read and execute the file.-rw------- The owner of the file may read and write the file.No other user canaccess the file.-rwxrwxrwx All users may read, write, and execute the file.3.10.3 Permissions Dependencies.The permissions granted to a file also depend on the permissions of the directory inwhich the file is located.For example, even if a file is set to -rwxrwxrwx, other userscannot access the file unless they have read and execute access to the directory in which thefile is located.For example, if Larry wanted to restrict access to all of his files, he could setthe permissions to his home directory/home/larryto-rwx------.In this way, noother user has access to his directory, and all files and directories within it.Larry doesn tneed to worry about the individual permissions on each of his files.In other words, to access a file at all, you must have execute access to all directoriesalong the file s pathname, and read (or execute) access to the file itself.Typically, users on a Linux system are very open with their files.The usual set ofpermissions given to files is -rw-r--r--, which lets other users read the file but notchange it in any way.The usual set of permissions given to directories is-rwxr-xr-x,which lets other users look through your directories, but not create or delete files withinthem.However, many users wish to keep other users out of their files.Setting the permissionsof a file to-rw-------will prevent any other user from accessing the file.Likewise, set-ting the permissions of a directory to-rwx------keeps other users out of the directoryin question.164 Linux Tutorial3.10.4 Changing permissions.The commandchmodis used to set the permissions on a file.Only the owner of a filemay change the permissions on that file.The syntax ofchmodischmod fa,u,g,ogf+,-gfr,w,xg filenamesBriefly, you supply one or more of all, user, group, or other.Then you specify whetheryou are adding rights (+) or taking them away (-).Finally, you specify one or more ofread, write, and execute
[ Pobierz całość w formacie PDF ]