For any given file in the web root, the permissions are initially set to me:www-data with chmod 750. Opening a file in an editor and saving via the editors save command changes the group to me:me. How do I prevent group changes on save?
Asked
Active
Viewed 1,630 times
0
Nick
- 589
2 Answers
1
Linux saves the file using your active group, so change your active group before you edit.
Easiest method is to change your primary group.
You can do this temporarily with newgrp , this command starts a new shell
newgrp www-data
gedit your_file
exit
If you want to change your primary group permanently, use usermod
usermod -g www-data your_user
Panther
- 104,528
0
This seems to be a bug (LP #199167).
You could try to open your editor as www-data using gksudo -u www-data gedit.
Louis Matthijssen
- 12,155