Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Let's say you have a web server where the htdocs and everything in it is owned by the apache daemon, wwwrun and it's group, www. What's the best way to set up an external web editor such as Bluefish or Coda that logs in via ssh(sftp), and edit files while still keeping permissions intact?

The best I've been able to figure out is logging into the box itself as myself and using sudo:

sudo -u wwwrun vi index.php

Obviously, I can't do that with Coda. Maybe I'm going about it the wrong way?

share|improve this question
up vote 1 down vote accepted

Access Control Lists

Not quite as common in the nix land but very useful. Takes away a lot of the "smart group management" problems and allows to define default. getfacl and setfacl are your friends. However take notive that with ext you need to mount the the acl option.

To get access with any editor use sshfs (fuse filesystem) on the client side, it may be a bit sluggish depending on your connection but you will mostly deal with normal filesystem semantics.

share|improve this answer

If www group has write permissions add the user you're logging as to this group.

share|improve this answer
And either setgid www the directory or make www the users primary group – wzzrd Jun 10 '09 at 11:36

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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