![]() |
Show 150 posts per page |
.dsy:it. (http://www.dsy.it/forum/)
- Tech (http://www.dsy.it/forum/forumdisplay.php?forumid=189)
-- [Eserc. Sicurezza] umask e permessi (http://www.dsy.it/forum/showthread.php?threadid=25932)
[Eserc. Sicurezza] umask e permessi
Salve a tutti. Incomincio una serie di post,se avete la pazienza di rispondermi 
Un esercizio del corso di sicurezza chiede di creare un utente e impostarlo in modo tale che i files e dir che crea li può leggere/scrivere solo lui,negando i permessi agli altri. Ora i primi due comandi sono quelli che Sullivan mette nelle soluzioni.
code:
[root@localhost orion]# useradd foobar [root@localhost orion]# umask 0077 [root@localhost orion]# su foobar [foobar@localhost orion]$ umask 0002
code:
[foobar@localhost ~]$ mkdir Ciao [foobar@localhost ~]$ mv Ciao /tmp [foobar@localhost ~]$ su orion [orion@localhost /]$ cd /tmp [orion@localhost tmp]$ ll totale 120 drwxrwxr-x 2 foobar foobar 4096 5 giu 19:49 Ciao

__________________
GET DROPBOX
# il grado di lentezza è direttamente proporzionale all'intensità della memoria;il grado di velocità è direttamente proporzionale all'intensità dell'oblio (Kundera) #
BLOG: Byte Strike
ChRiS 
Re: [Eserc. Sicurezza] umask e permessi
Originally posted by Voodoo
code:
[root@localhost orion]# useradd foobar [root@localhost orion]# umask 0077 [root@localhost orion]# su foobar [foobar@localhost orion]$ umask 0002
code:
[root@localhost orion]# useradd foobar [root@localhost orion]# su foobar [foobar@localhost orion]# umask 0077 [foobar@localhost orion]# umask 0077
code:
[foobar@localhost ~]$ mkdir Ciao [foobar@localhost ~]$ mv Ciao /tmp [foobar@localhost ~]$ su orion [orion@localhost /]$ cd /tmp [orion@localhost tmp]$ ll drwx--S--- 2 foobar foobar 4096 5 giu 19:49 Ciao
code:
[foobar@localhost ~]$ mkdir Ciao [foobar@localhost ~]$ mv Ciao /tmp [foobar@localhost ~]$ su orion [orion@localhost /]$ cd /tmp [orion@localhost tmp]$ ll totale 120 drwxrwxr-x 2 foobar foobar 4096 5 giu 19:49 Ciao
code:
umask 0077
Ti ringrazio per le risposte,si hai capito bene,stasera provo 
EDIT: Ok ha funzionato 
__________________
GET DROPBOX
# il grado di lentezza è direttamente proporzionale all'intensità della memoria;il grado di velocità è direttamente proporzionale all'intensità dell'oblio (Kundera) #
BLOG: Byte Strike
ChRiS 
| All times are GMT. The time now is 23:40. | Show all 3 posts from this thread on one page |
Powered by: vBulletin Version 2.3.1
Copyright © Jelsoft Enterprises Limited 2000 - 2002.