joebanescu
joebanescu

Reputation: 41

After I update to MacOs Catalina MAMP stop working

I have a folder on my Desktop named work where I keep all my php projects. I use MAMP and all projects are set to work on virtual hosts, for example, if I have a project named test I access this project on this URL http://test.dev.

Everything went ok until I updated to macOS Catalina when I started to have this error.

(1)Operation not permitted: Can't open directory for index: /Users/username/Desktop/work/php/development/projectname.

I set the permissions to the work folder and all subfolders to be read & write for my user and staff group, I tried all the terminal permission

commands: chmod 777, 755, etc.

Upvotes: 4

Views: 10440

Answers (5)

Nam Nguyen
Nam Nguyen

Reputation: 2498

I had the same problem like you, and I spent many days to solve it by doing:

stop MAMP, then open terminal and type

sudo /Applications/MAMP/bin/startApache.sh -> then Enter

and then type your admin password to give apache full privileges to start apache. (this way can let MAMP read any files on your Mac, include external drives)

now you can open MAMP and see that Apache is started, then click Start on MAMP app to start MySql too.

Upvotes: 11

Francesco De Giorgio
Francesco De Giorgio

Reputation: 49

I've solved doing the following operations:

  1. Quit MAMP and all the applications that are using mySql and Apache Server (stop all the instances)

  2. Go to System Preferences, Systema & Privacy, Full Disk Access Tab

  3. Click "add" and go to /Applications/MAMP/Library/bin and add apachectl

  4. Run this command from the terminal: sudo /Applications/MAMP/bin/startApache.sh\

  5. Open MAMP and press the Start Servers button

now you should be able to start your localhost app

Upvotes: 4

Marco Scherer
Marco Scherer

Reputation: 1

I had a similar problem with XAMPP. Apache just lost access to my external drive, which I included via a symlink. Even giving "Full Disk Access" to the httpd webserver didn't help.

The final solution was to start Apache with the sudo command:

sudo Applications/XAMPP/bin/apachectl start

did the job for me. Please note that

sudo apachectl start

would start the Apache that comes with macOS and thus wouldn't be used with XAMPP (and MAMP as well, I guess).

Upvotes: 0

real328
real328

Reputation: 1

Prior to the steps below I added Full disk access to MAMP under the Security and Privacy Folder.

The steps I did after:

  1. Stop MAMP

  2. Open terminal

  3. Then type: /Applications/MAMP/bin/startApache.sh

  4. Start MAMP

Incase it wont work, try on the terminal: /Applications/MAMP/bin/stopApache.sh and then /Applications/MAMP/bin/startApache.sh

Upvotes: 0

Ivan
Ivan

Reputation: 156

This could be due to wrong permission given by the new MacOS Catalina permission manager. A possible way to solve this issue is to check if the folder in which the project is stored can be accessed by your Application.

To do this you have to:

  • Go to System Preferences
  • Go to System & Privacy
  • Go to Files and Folders
  • Be sure that the folder of your project is checked in the subsection concerning your Application

I hope this could solve your problem.

Upvotes: 1

Related Questions