snipt

Ctrl+h for KB shortcuts

Bash

403 Forbidden error apache mac os x

1
2
3
4
5
6
#  To avoid the 403 Forbidden error when browsing sites in your ~/Sites folder
#  add the apache user "_www" to the staff group... 
#  Note: sometimes staff may be admin if you're upgrading from earlier OS X
#
#  Solution for OS X Leopard's dscl tool (Directory Service Command Line)
sudo dscl . -append /Groups/staff GroupMembership "_www"
https://snipt.net/embed/ac7aa37befea77f5f4db863a3c18ec3c/
/raw/ac7aa37befea77f5f4db863a3c18ec3c/
ac7aa37befea77f5f4db863a3c18ec3c
bash
Bash
6
2019-07-19T03:44:41
True
False
False
/api/public/snipt/3554/
403-forbidden-error-apache-mac-os-x
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a> <a href="#L-6">6</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="c1"># To avoid the 403 Forbidden error when browsing sites in your ~/Sites folder</span> </span><span id="L-2"><a name="L-2"></a><span class="c1"># add the apache user &quot;_www&quot; to the staff group... </span> </span><span id="L-3"><a name="L-3"></a><span class="c1"># Note: sometimes staff may be admin if you&#39;re upgrading from earlier OS X</span> </span><span id="L-4"><a name="L-4"></a><span class="c1">#</span> </span><span id="L-5"><a name="L-5"></a><span class="c1"># Solution for OS X Leopard&#39;s dscl tool (Directory Service Command Line)</span> </span><span id="L-6"><a name="L-6"></a>sudo dscl . -append /Groups/staff GroupMembership <span class="s2">&quot;_www&quot;</span> </span></pre></div> </td></tr></table>
"directory service", "mac os x", "user administration", bash, www