I'm trying to edit a file on my mac. The file is config.inc.php of XAMPP located in /opt/lampp/phpmyadmin.

Permission of the folder and file:

Phpmyadmin -> drwxr-xr-x 12 root wheel 4096

Config.inc.php -> -rw-r--r-- 1 daemon daemon 5109 config.inc.php

I tried to open file with: sudo nano config.inc.php but it doesn't change it because it says i don't have permission to do it.

To changing the privileges with: sudo chmod 777 config.inc.php, but it doesn't make me modify it.

To reset privileges of the computer and create a new administrator User, but he doesn't want to know about changing the permissions.

I'm freaking out can anyone help me out?

Here a screenshot of the Terminal error:

Here a screenshot of the terminal error

  • 1
    @Laurenz: Did you check this stackoverflow.com/questions/52932609/…
    – Udhy
    Dec 10, 2019 at 10:20
  • @nohillside Ok i have installed it and finally modify config.inc.php. But i have another problem. When i try to connect with database from terminal out of the virtual machine and i use mysql -uroot, terminal give me that error: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2). Have you ever seen anything like this?
    – Laurenz
    Dec 10, 2019 at 12:01
  • I haven't even used LAMPP before :-) Maybe questions like that are better asked on community.apachefriends.org
    – nohillside
    Dec 10, 2019 at 12:08
  • @nohillside Ok thank you soo much, you helped me a lot!
    – Laurenz
    Dec 10, 2019 at 12:11

1 Answer 1


XAMPP-VM runs within a Linux VM, so you can't access the config files directly within the macOS filesystem. To access the VM either open Terminal from the XMPP launcher

enter image description here

or run

ssh -i ~/.bitnami/stackman/machines/xampp/ssh/id_rsa -o StrictHostKeyChecking=no root@

By default the XAMPP VM doesn't include any editor at all so you need to install one using apt-get:

apt-get update
apt-get install nano

Afterwards you can run nano /opt/lampp/phpmyadmin/config.inc.php to edit the file.

PS: Based on https://stackoverflow.com/questions/52932609/unable-to-edit-config-inc-php

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .