1

I have file with owner www-data and group www-data. When I modified this file, it automatically change file owner to current user victor and group victor.

Can I modified foreign file without owner and group changes?

NOTE: Manually change file owner and group after edit does not fit

NOTE: I use Sublime Text 3 text editor for editing files

  • I updated my answer with a better solution, perhaps you want to check it out – kos Apr 12 '15 at 6:07
2

Add yourself permanently to the www-data group:

adduser <username> www-data

<username> = your username

Or, alternatively, use sudo to temporarily launch subl as a member of the www-data group:

sudo -g www-data subl <file_path>

<file_path> = your file's path

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.