git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git for local web development

From
Martin Langhoff <martin.langhoff@gmail.com>
Date
Apr 17, 2009, 18:48 UTC
Message-ID
<46a038f90904171148xefb2085yc47e58c62cd3bbaf@mail.gmail.com>
In-Reply-To
<20090417183046.GB30240@coredump.intra.peff.net>
On Fri, Apr 17, 2009 at 8:30 PM, Jeff King <peff@peff.net> wrote:
> repo and working tree are not owned by "william"? As long as www-data,
> presumably the webserver could still serve it.

Also, as long as they are owned by www-data, the setup is more vulnerable to security problems.

Files served by Apache (or any other webserver) should _not_ be owned by the same user that the webserver runs under. The www-data ownership is exclusively for files that you expect the webserver to be able to _modify_: files uploaded by users, session data files, sqlite databases and such.

You don't really want your webserver changing executable files such as PHP.

It is a valid thing to create a user to own those files, and in servers where a team was maintaining the code, we have often used 'www-code'.

cheers,
m
-- 
 martin.langhoff@gmail.com
 martin@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
Previous: Jeff KingNext: William DiNoia
Message 5 of 6 in “git for local web development”
  1. William DiNoiaApr 16, 2009
  2. Jeff KingApr 17, 2009
  3. William DiNoiaApr 17, 2009
  4. Jeff KingApr 17, 2009
  5. Martin LanghoffApr 17, 2009
  6. William DiNoiaApr 17, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.