Skip to content

Commit bf8d8a0

Browse files
committed
Set directory permissions for Apache
Apache process doesn’t have write permissions for the /opt/git/ subdirectories. Restore the paragraph from this section: https://git-scm.com/book/en/v1/Git-on-the-Server-Public-Access. Signed-off-by: Vitaly Kuznetsov <[email protected]>
1 parent 0e74969 commit bf8d8a0

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

book/04-git-server/sections/smart-http.asc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ $ a2enmod cgi alias env
1818

1919
This also enables the `mod_cgi`, `mod_alias`, and `mod_env` modules, which are all needed for this to work properly.
2020

21+
You’ll also need to set the Unix user group of the `/opt/git` directories to `www-data` so your web server can read- and write-access the repositories, because the Apache instance running the CGI script will (by default) be running as that user:
22+
23+
[source,console]
24+
----
25+
$ chgrp -R www-data /opt/git
26+
----
27+
2128
Next we need to add some things to the Apache configuration to run the `git-http-backend` as the handler for anything coming into the `/git` path of your web server.
2229

2330
[source,console]

0 commit comments

Comments
 (0)