403 Error When Running Catalina (Several Sites)

After upgrading your system to Catalina, you might experience an issue where visiting your websites result in a 403 error. This is because Apple has locked down the Documents folder, and by default, DesktopServer stores your site files in Documents\Websites. The solution for this is to move your files to another directory. There are two methods to do this. If you have a few sites, the easiest way to do this is simply using the "Move" Option within DesktopServer as outlined in this Help Document.

Part I - Moving Your Website Files

  1. To begin, please be sure that DesktopServer or any of its services are running. If DesktopServer is running, click on the "Stop or restart the web and database services." radio button and then click "Next"
  2. Click on "Stop the web and database services." --> Next
  3. Once services are stopped, click "Close
  4. Check to be sure that all DesktopServer services are stopped as follows:
    1. Open Applications --> Utilities --> Activity Monitor
    2. In the search pane, type, "httpd" 
      1. If there are any httpd services listed, select them, click on the "x" in the left-hand corner of the window and then select, "Force Quit"
      2. The window should show no results for httpd when done
    3. In the search pane, type, "mysqld"
      1. If there are any mysqld services listed, select them, click on the "x" in the left-hand corner of the window and then select, "Force Quit"
  5. Now that you have successfully shut down all DesktopServer services, you will want to move the files for your sites to a new directory.
  6. Open a new Finder window and navigate to your Documents/Websites Directory
  7. Select all of your website folders and then press command+c to copy these files
  8. In Catalina, Apple has created a new default directory for Sites. You can choose to use this directory or you can choose your own, but be sure to take note of where you placed these files.
  9. To move the files to the new directory, navigate to Users/YourUserName/Sites
  10. Click Option+Command+v to move the website files to the new directory

Part II - Editing The DesktopServer Preferences File

  1. In your Finder Window, navigate to /Users/Shared
  2. Be sure that you can see hidden files. If you do not see a .com.serverpress.desktopserver.json file, press Command+Shift+Dot to show hidden files.
  3. Open the file .com.serverpress.desktopserver.json in your favorite text editor
  4. Scroll down until you find the line that says,"documents":"\/private\/var\/root\/Documents\/Websites",

  5. Change this to read, "documents":"\/Users\/YourUserName\/Sites" (Or you can change this to reflect the directory in which you saved your website files)

  6. You will find an entry for each site file in your Preferences File. Change the line for each site definition from "\/private\/var\/root\/Documents\/Websites\/YourSiteName" to "\/Users\/YourUserName\/Sites\/YourSiteName"
  7. Save your Preferences File and close it
  8. Start up DesktopServer. Your sites should now be available to you.