Visualizza la versione completa : Assegnare gruppo di default a files creati in una directory specifica

20-02-2009, 18:51
Ciao, come da oggetto, possibile che i file scritti in una determinata directory abbiano assegnato di default un gruppo da me scelto?

Credo di si, ma non ricordo come si fa :D

ciao e grazie

20-02-2009, 19:49
SUID and SGID for Directories

The SUID bit has no effect on directories.

In Linux and Solaris, when SGID is set on a directory files created in that directory will have their GID automatically reset to that of the directory's GID. This means that setting the SGID bit on a directory causes any new files or directories created within to inherit the group identity of that directory rather than that of the user. Also, new sub-directories will inherit the SGID bit as well.

The purpose of this approach is to support project directories: users can save files into such SGID directories and the group identity of the file automatically changes. This is useful for example on the Document Root of a website or other directories containing a set of files worked on by a specific group of users. (It works especially well if each user's primary group (*) is a private group for that user, and the umask (*) setting is 002). However, setting the setgid bit on directories is not specified by standards such as the Single Unix Specification [Open Group 1997].

da qui: http://content.hccfl.edu/pollock/AUnix1/FilePermissions.htm

21-02-2009, 17:52
Potresti limitare il livello di accesso (scritura esecuzione) della dir ai soli utenti che appartengono al gruppo scelto.

23-02-2009, 15:28
Originariamente inviato da mxa
da qui: http://content.hccfl.edu/pollock/AUnix1/FilePermissions.htm

ecco, era quello che cercavo, grazie