0

Recently i installed Apache / PHP using brew on a machine running MacOs Ventura. It worked well for some days until i had to restart the machine.

Now when i try to navigate to localhost, i get 403 Forbidden and Apache error log shows a lot of lines like this :

[Wed Aug 02 10:10:06.198965 2023] [core:error] [pid 337] (13)Permission denied: [client ::1:51255] AH00035: access to /favicon.ico denied (filesystem path '/Users/admin/Library') because search permissions are missing on a component of the path, referer: http://localhost/

Here are the things i already tried with no luck :

1 - Restarted Apache using brew services restart httpd

2 - Checked my www folder permissions, it's 'read & write' to Everyone.

3 - Tried to mark my www folder as "Shared folder" on MacOs

3 - Checked httpd.conf settings for my www folder , it's like this :

DocumentRoot "/Users/admin/Library/Mobile Documents/com~apple~CloudDocs/www"
<Directory "/Users/admin/Library/Mobile Documents/com~apple~CloudDocs/www">
    #
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.
    #
    # The Options directive is both complicated and important.  Please see
    # http://httpd.apache.org/docs/2.4/mod/core.html#options
    # for more information.
    #
    Options Indexes FollowSymLinks

    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   AllowOverride FileInfo AuthConfig Limit
    #
    AllowOverride All

    #
    # Controls who can get stuff from this server.
    #
    Require all granted
</Directory>

What else should i look for ?

delphirules
  • 6,443
  • 17
  • 59
  • 108
  • 1
    You may be running into privacy restrictions (which are separate from regular file permissions). See ["What and how does macOS Mojave implement to restrict applications access to personal data?"](https://apple.stackexchange.com/questions/332673/what-and-how-does-macos-mojave-implement-to-restrict-applications-access-to-pers). Does the web docs folder really need to be in your iCloud documents? – Gordon Davisson Aug 03 '23 at 09:39
  • @GordonDavisson I put it on icloud so it's always 'backed up' and ready to access on another machine. I always did this and it always worked well ; in fact it was working until my last reboot – delphirules Aug 03 '23 at 16:23

1 Answers1

0

After some days struggling with this issue, i discovered that all i needed is to start httpd using sudo :

sudo brew services restart httpd

My guess is , because my www folder is inside my icloud folder, it needs admin permission.

delphirules
  • 6,443
  • 17
  • 59
  • 108