Xampp Mac Htdocs

Question or issue on macOS:

I installed XAMPP 1.7.3 on Mac OS X 10.6.8 without changing any defaults.

The webserver seems to work okay, but the permissions on the htdocs directory are set to “Read only” for everyone other than system. So (a) I have to provide root password every time I copy in web content, and, more problematic, (b) NetBeans says it can’t create a target directory, and doesn’t even generate the index.php file in the source directory.

Do I just need to manually change permissions on the htdocs directory, or is there some more global XAMPP setting that should be changed? Running NetBeans as root seems a bit extreme.

How to solve this problem?

Solution no. 1:

This video show how to run files in htdocs in the new XAMPP for Mac. This video show how to run files in htdocs in the new XAMPP for Mac. The XAMPP welcome page. To have Apache serve your own web site content there are two main options. The first is to place it within the default DocumentRoot.The second is to place it outside of the default DocumentRoot and use the Alias directive to map a URL to this location. XAMPP is similar to MAMP, free, and available for Mac, Windows and Linux. In a default installation, the web root folder is located under programs/XAMPP/htdocs on a Mac or C: XAMPP htdocs on Windows. XAMPP is probably the most popular GUI tool used on Windows/Linux. WAMP is an open source tool with a GUI interface for Windows only. The XAMPP welcome page. To have Apache serve your own web site content there are two main options. The first is to place it within the default DocumentRoot.The second is to place it outside of the default DocumentRoot and use the Alias directive to map a URL to this location. In the following examples, the generic index.php file below is placed within the DocumentRoot or aliased location.

Tried the above but the option to amend the permission was not available for the htdocs folder,

My solution was:

  1. Open applications folder
  2. Locate XAMPP folder
  3. Right click, get info (as described above)
  4. In pop-up window locate the ‘sharing & permission’ section
  5. Click the ‘locked’ padlock symbol
  6. Enter admin password
  7. Change ‘Everyone’ permissions to read & write
  8. In the get info window still, select the ‘cog’ icon’ drop down option at the very bottom and select ‘Apply to enclosed items’ this will adjust the permission across all sub-folders as well.
  9. Re-lock the padlock symbol
  10. Close the ‘Get Info’ window.

Task complete, this will now allow you to populate sub-folders within the htdocs folder as needed to populate your website(s).

Solution no. 2:

Make sure the XAMPP app is running then:

  1. Under General Tab, in XAMPP app, click Open Terminal
  2. A terminal will be launched with something like, [email protected]:~#, on the terminal shell
  3. on that terminal shell, type, chmod -R 0777 /opt/lampp/htdocs/ and enter
  4. Exit, the terminal and you be good to go

Solution no. 3:

Xampp Mac Htdocs

For latest OSX versions,

  1. Right click on the folder
  2. Select Get Info
  3. Expand the Sharing & Permission section
  4. Unlock the folder by clicking lock icon on bottom right-corner
  5. Now, select the user list and enable Read & Write privilege for the users
  6. Click on the + icon to add username
  7. Finally click settings icon and select Apply to enclosed items..

Solution no. 4:

Htdocs

For new XAMPP-VM for Mac OS X,
I change the ownership to daemon user and solve the problem.

For example,

Solution no. 5:

If you use Mac OS X and XAMPP, let’s assume that your folder with your site or API located in folder /Applications/XAMPP/xamppfiles/htdocs/API. Then you can grant access like this:

And now open the page inside the folder:

Solution no. 6:

Following the instructions from this page,

  1. Open the XAMPP control panel (cmd-space, then enter manager-osx.app).
  2. Select Manage Servers tab -> select Apache Web Server -> click Configure.
  3. Click Open Conf File. Provide credentials if asked.
  4. Change

    to

  5. Save and close.

  6. Using the XAMPP control panel, restart Apache.
  7. Navigate to the document root of your server and make yourself the owner. The default is /Applications/XAMPP/xamppfiles/htdocs.

  8. Navigate to the xamppfiles directory and change the permission for logs and temp directory.

  9. To be able to use phpmyadmin you have to change the permissions for config.inc.php.

Solution no. 7:

Xampp Windows

Go to htdocs folder, right click, get info, click to unlock the padlock icon, type your password, under sharing permission change the priviledge for everyone to read & write, on the cog wheel button next to the + and – icons, click and select apply to all enclosed items, click to accept security request, close get info. Now xampp can write and read your root folder.

Note:

  1. If you copy a new folder into the htdocs after this, you need to repeat the process for that folder to have write permission.

  2. When you move your files to the live server, you need to also chmod the appropriate files & folders on the server as well.

Solution no. 8:

if you use one line folder or file

Solution no. 9:

You can also simply change Apache Conf file to a different User Name and keep the group:

Apache Conf Applications/Xammp/etc/.

User ‘User’ = your user name in Mac os x.

Google xampp

Xampp For Mac Os

MacXampp

How To Use Xampp On Mac

Group daemon

Solution no. 10:

Best solution for MAC OS Catalina Xampp

  1. Open Finder
  2. Press Cmd + shift + C
  3. Macintosh HD => Users => copy {username}

  4. Open /Applications/XAMPP/xamppfiles/etc/httpd.conf

    Find User daemon edit daemon => {username}

  5. Xampp Manage Server => Restart all

If you encounter problems in phpMyAdmin:

Goodluck

3,287 3,287 Weekly Downloads

Cached

2,212 2,212 Weekly Downloads

Hope this helps!