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?
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?
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 shellIf you want to change your primary group permanently, use
usermod
This seems to be a bug (LP #199167).
You could try to open your editor as
www-data
usinggksudo -u www-data gedit
.