I need that for the folder /var/www when my user testuser creates a file the permissions are g+rwx and the files belong to the group www-data
Any idea of how could I do that ?
Cheers.
EDIT:
I'm creating the files via SSH.
|
I need that for the folder Any idea of how could I do that ? Cheers. EDIT: I'm creating the files via SSH. | ||||
|
feedback
|
|
To set the group, give
To also adjust subdirectories: This will make all newly created files inherit the parent directory's group, instead of the user's. To set the default group permissions, you will have to use ACLs. Set a "default" ACL:
To also adjust subdirectories: Note: The file system must have ACL support enabled. Sometimes it is on by default; on ext3 or ext4 you might get "Operation not supported", in which case it must be enabled manually:
| ||||
|
feedback
|
|
The group of the files being created by an user is the group of that user (in /etc/group). The permissions are controlled by the UMASK parameter see this | |||
|
feedback
|
stor/appe? Via HTTPPUT? Through a shell account? These details are important, because they greatly affect the possible answers, and need to be in your question. – JdeBP Jan 23 at 13:06