<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body bgcolor="#ffffff" text="#000000">
I've complained about this before, but I'm still hoping somebody can
tell me something I don't know.<br>
<br>
I'll skip the details and just say the situation is that a programmer
is developing a web app, but the web app also does code generation, so
the programmer (a regular linux user) must have full control over the
files, but the apache process (www-data on ubuntu) must also have full
control.<br>
<br>
This is only on a dev workstation, the situation can be avoided on a
production server but not on a dev workstation.<br>
<br>
Here is the question: It seems to me that everything about Linux is set
up to prevent this from happening without major interventions that a
newer Linux user will not understand and a veteran will consider
inappropriate.  Am I missing something?  Is there a simple way to give
two users full control over a body of files?  Don't just say "groups"
automatically, see below:<br>
<br>
METHOD 1: <br>
<br>
1) Add the programmer's user account to the www-data group (veterans
may object, newbies may stumble)<br>
2) Put perms to 6770 on the file tree<br>
3) Set ownership to <user>:www-data on the file tree<br>
<br>
This is what I am doing now.  Believe it or not this is as simple as I
could figure it, but I'm shooting for simpler.<br>
<br>
METHOD 2:<br>
<br>
This gives the veterans fits, but I figured <i>on a dev workstation</i>
I would just run apache as my account.  This is <i>more invasive</i>,
but <i>only at a single point</i>.  At this point the veterans jump in
with "never, never, never" but don't usually address the context of the
situation, so I don't know what to do with their advice.  <br>
<br>
<br>
METHOD 3:<br>
<br>
Complex ACL's.  There seems to be on-off support for more complex file
permissions in Linux, but I get the sense it is a red-headed
stepchild.  If there were a more powerful permissions system that
understood the idea of giving two separate users the same permissions,
I'd be very happy to accept a <i>configurable dependency</i>, but I
don't get the idea that's out there.<br>
<br>
So I'm really hoping I missed something in the last 10 years on how
linux controls file permission :(<br>
<br>
<br>
<br>
<br>
<br>
<pre class="moz-signature" cols="72">-- 
Kenneth Downs
Secure Data Software
<a class="moz-txt-link-abbreviated" href="mailto:ken@secdat.com">ken@secdat.com</a>  <a class="moz-txt-link-abbreviated" href="http://www.andromeda-project.org">www.andromeda-project.org</a> <a class="moz-txt-link-abbreviated" href="http://www.secdat.com">www.secdat.com</a>
Office: 631-689-7200
Cell: 631-379-0010
Fax: 631-689-0527
</pre>
</body>
</html>