💻 Software
How do I force group and permissions for created files inside a specific directory?
Fresh7 days ago
Mar 15, 202689919 viewsConfidence Score0%
0%
Problem
For files created from the testuser account in the /var/www directory, I need they have g+rwx as permissions, and www-data as group. How can I achieve this? I'm creating the files via SSH.
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Canonical Fix
Unverified Fix
New Fix – Awaiting Verification
Fix for: How do I force group and permissions for created files inside a specific directory?
Low Risk
To set the group, give the setgid bit: 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…
Awaiting Verification
Be the first to verify this fix
Sign in to verify this fix