Missione 37Security Auditor
+260 XP
Default Permissions & Group Ownership (umask & chgrp)
Avvia il terminale interattivo per questa missione→Nessuna installazione richiesta • Funziona nel browser
Concetto e panoramica
Whenever a program creates a new file or folder, its initial permissions are determined by the umask (user file-creation mode mask). The umask acts as a filter that strips away permissions from maximum defaults (666 for files, 777 for directories):
- Standard umask 022 subtracts group/other write permissions, yielding 644 (rw-r--r--) for files and 755 (rwxr-xr-x) for folders.
- Running umask 027 tightens security by stripping all permissions from "others", yielding 640 and 750.
To change only the group owner of a file without altering its user owner, use chgrp .
Istruzioni della missione
1. Run
2. Change the group ownership of
umask to view your current file-creation mask, then tighten permissions by running umask 027.2. Change the group ownership of
project.txt to the developers group using chgrp developers project.txt.Riferimento sintassi dei comandi
| Command / Syntax | Description |
|---|---|
umask | Display current octal file-creation mask |
umask 027 | Set restrictive umask to 027 |
chgrp developers project.txt | Change group ownership to developers |
Obiettivi di verifica
- ○Run the "umask" command
- ○Set umask to 027 using "umask 027"
- ○Change group of project.txt to developers using chgrp