Re: Forcer le propriétaire d'un fichier
* Philippe LE NAOUR <ml@le-naour.com> [2002-10-25 14:17] :
> Salut à tous,
>
> Cette question n'est forcément restreinte à la Debian.
>
> Y-a-t-il un moyen pour forcer l'appartenance d'un fichier créé dans un
> répertoire. Un petit exemple:
>
> Je suis l'utilisateur UserA et je créé un fichier dans un répertoire. Je
> voudrais que ce fichier appartienne automatiquement à UserB ou au moins à
> son groupe.
C'est faisable via l'utilisation du bit setgid de répertoire. D'après
la doc info de fileutils :
2. set the process's effective group ID to that of the file upon
execution (called the "setgid bit"). For directories on some
systems, put files created in the directory into the same group as
the directory, no matter what group the user who creates them is
in.
Fred
Reply to: