|
|||||||
|
|
|
![]() |
|
|
Strumenti |
|
|
#1 |
|
Senior Member
Iscritto dal: Jul 2002
Città: Padova
Messaggi: 4245
|
umask su ext4
Ciao a tutti, volevo chiedere se è possibile impostare umask=000 su una partizione in modo che qualsiasi file creato da qualsiasi utente abbia tutti i diritti di lettura/scrittura/esecuzione.
Ho fatto varie prove, ma non riesco proprio a trovare una soluzione a questo problema |
|
|
|
|
|
#2 |
|
Senior Member
Iscritto dal: Apr 2004
Messaggi: 9516
|
per i file non puoi avere un permesso piu alto di 666, se non a mano
per i file il bit di esecuzione non viene impostato con qualsiasi mask |
|
|
|
|
|
#3 |
|
Senior Member
Iscritto dal: Jul 2002
Città: Padova
Messaggi: 4245
|
ah ok, forse era li che sbagliavo.
Su fstab mettevo umask=000 e in quel modo iniziava a darmi problemi nel mount del volume. Ora provo con 666 ![]() Grazie. Ciao. |
|
|
|
|
|
#4 |
|
Senior Member
Iscritto dal: Jul 2002
Città: Padova
Messaggi: 4245
|
Ho provato a cambiare il valore su umask, ma non mi monta più il volume dandomi degli errori.
In cosa sbaglio? la riga di fstab è questa: Codice:
UUID=ee2c5c77-979e-475c-8e13-d510034bfec9 /dati ext4 defaults,umask=111 0 2 |
|
|
|
|
|
#5 |
|
Senior Member
Iscritto dal: Apr 2004
Messaggi: 9516
|
la regola per i file e':
file 666 - umask = risultato permessi che errore ti da quando hai messo umask=000 ? http://www.cyberciti.biz/tips/unders...lue-usage.html |
|
|
|
|
|
#6 | |||
|
Senior Member
Iscritto dal: Jul 2002
Città: Padova
Messaggi: 4245
|
Quote:
Quote:
Quote:
|
|||
|
|
|
|
|
#7 |
|
Senior Member
Iscritto dal: Apr 2004
Messaggi: 9516
|
e senza il parametro "umask" viene montato?
p.s. nel man di mount per ext4 (Mount options for ext4) non vedo il parametro: umask Ultima modifica di sacarde : 12-11-2010 alle 22:03. |
|
|
|
|
|
#8 |
|
Senior Member
Iscritto dal: Jul 2002
Città: Padova
Messaggi: 4245
|
|
|
|
|
|
|
#9 |
|
Senior Member
Iscritto dal: Apr 2004
Messaggi: 9516
|
|
|
|
|
|
|
#10 |
|
Senior Member
Iscritto dal: Jul 2002
Città: Padova
Messaggi: 4245
|
Già guardato, però su man fstab non c'è nessun riferimento a umask, mentre su man umask c'è questo ma non mi dice nulla di più di quello che già so:
Codice:
UMASK(2) Linux Programmer's Manual UMASK(2)
NAME
umask - set file mode creation mask
SYNOPSIS
#include <sys/types.h>
#include <sys/stat.h>
mode_t umask(mode_t mask);
DESCRIPTION
umask() sets the calling process's file mode creation mask (umask) to mask & 0777 (i.e., only the file permission bits of mask are used), and returns the previous value
of the mask.
The umask is used by open(2), mkdir(2), and other system calls that create files to modify the permissions placed on newly created files or directories. Specifically,
permissions in the umask are turned off from the mode argument to open(2) and mkdir(2).
The constants that should be used to specify mask are described under stat(2).
The typical default value for the process umask is S_IWGRP | S_IWOTH (octal 022). In the usual case where the mode argument to open(2) is specified as:
S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH
(octal 0666) when creating a new file, the permissions on the resulting file will be:
S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH
(because 0666 & ~022 = 0644; i.e., rw-r--r--).
RETURN VALUE
This system call always succeeds and the previous value of the mask is returned.
CONFORMING TO
SVr4, 4.3BSD, POSIX.1-2001.
NOTES
A child process created via fork(2) inherits its parent's umask. The umask is left unchanged by execve(2).
The umask setting also affects the permissions assigned to POSIX IPC objects (mq_open(3), sem_open(3), shm_open(3)), FIFOs (mkfifo(3)), and Unix domain sockets
(unix(7)) created by the process. The umask does not affect the permissions assigned to System V IPC objects created by the process (using msgget(2), semget(2),
shmget(2)).
SEE ALSO
chmod(2), mkdir(2), open(2), stat(2)
COLOPHON
This page is part of release 3.24 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.ker‐
nel.org/doc/man-pages/.
|
|
|
|
|
|
#11 |
|
Senior Member
Iscritto dal: Jul 2002
Città: Padova
Messaggi: 4245
|
Facendo varie ricerche su internet, vedo che umask viene sempre usato con vfat e ntfs.
Non è che sia utilizzabile solo con questi due tipi di filesystem? E se così fosse, vuoi che non ci sia il modo di creare in automatico file e cartelle con determinati diritti anche su altri tipi di filesystem? |
|
|
|
|
|
#12 |
|
Senior Member
Iscritto dal: Apr 2004
Messaggi: 9516
|
dal man di mount sembra proprio cosi'
|
|
|
|
|
|
#13 |
|
Senior Member
Iscritto dal: Oct 2003
Città: Caserta
Messaggi: 487
|
Mi pare di ricordare che umask funzioni solo fino a ext2....
|
|
|
|
|
| Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 17:22.





















