diff --git a/cli/Valet/Site.php b/cli/Valet/Site.php
index <HASH>..<HASH> 100644
--- a/cli/Valet/Site.php
+++ b/cli/Valet/Site.php
@@ -304,11 +304,19 @@ class Site
             $caSrlParam = ' -CAserial ' . $caSrlPath;
         }
 
-        $this->cli->run(sprintf(
+        $result = $this->cli->runAsUser(sprintf(
             'openssl x509 -req -sha256 -days 730 -CA "%s" -CAkey "%s"%s -in "%s" -out "%s" -extensions v3_req -extfile "%s"',
             $caPemPath, $caKeyPath, $caSrlParam, $csrPath, $crtPath, $confPath
         ));
 
+        // If cert could not be created using runAsUser(), use run().
+        if (strpos($result, 'Permission denied')) {
+            $this->cli->run(sprintf(
+                'openssl x509 -req -sha256 -days 730 -CA "%s" -CAkey "%s"%s -in "%s" -out "%s" -extensions v3_req -extfile "%s"',
+                $caPemPath, $caKeyPath, $caSrlParam, $csrPath, $crtPath, $confPath
+            ));
+        }
+
         $this->trustCertificate($crtPath);
     }
handle SSL .crt creation "Permission denied" failure