OPS145 Lab 4 Newversion: Difference between revisions

From Littlesvr Wiki
Jump to navigation Jump to search
(Replaced content with "The latest version is here: OPS145_Lab_4 Category:OPS145")
Tag: Replaced
 
(27 intermediate revisions by the same user not shown)
Line 1: Line 1:
= !!!THIS PAGE IS NOT READY YET!!! =
The latest version is here: [[OPS145_Lab_4]]


= Binary review =
[[Category:OPS145]]
Go back and review the binary stuff we looked at [[OPS145 Introduction#Digital electronics|in the course introduction]].
 
This lab is about POSIX permissions, and you need to be completely comfortable with binary-to-decimal and decimal-to-binary conversion from 000 to 111 (decimal 0 to 7).
 
Here's a summary of the absolute minimum you need to remember from that:
{| class="wikitable"
!Binary
!Decimal
|-
|000
|0+0+0=0
|-
|00'''1'''
|0+0+'''1'''=1
|-
|0'''1'''0
|0+'''2'''+0=2
|-
|0'''11'''
|0+'''2'''+'''1'''=3
|-
|'''1'''00
|'''4'''+0+0=4
|-
|'''1'''0'''1'''
|'''4'''+0+'''1'''=5
|-
|'''11'''0
|'''4'''+'''2'''+0=6
|-
|'''111'''
|'''4'''+'''2'''+'''1'''=7
|}
 
= Read, Write, Execute (rwx) permissions =
On a Linux filesystem every file and directory has 9 bits of information allocated for reording basic permissions. Those 9 bits are split into three groups of 3 bits.
 
Each group of 3 bits records whether the following permissions are granted:
 
* read permission (most significant bit, on the left, decimal 4)
* write permission (second bit, in the middle, decimal 2)
* execute permission (least significant bit, on the right, decimal 1)
 
These are usually called "octal" rather than decimal, but I suspect you won't find any value in that extra complication, so you can just think of them as decimal numbers.
 
== Permissions for files ==
The read and write permissions for files are pretty self-explanatory.
 
= Also: =
 
* binary review
* read, write, execute permissions
** for files
** for directories
* owner user, owner group, others
* chmod with octal
* quick adduser with id 1145, passwd
* try examples with two users
*

Latest revision as of 01:03, 4 February 2024

The latest version is here: OPS145_Lab_4