[SOLVED] Changing ownership of htdocs

Problems with the Linux version of XAMPP, questions, comments, and anything related.

[SOLVED] Changing ownership of htdocs

Postby ysg » 27. October 2011 16:46

This is a unique problem that I just noticed after I put XAMPP on my Ubuntu 11.04 distro.

I installed it fine and started everything up just as easy (sudo ./lampp start). All worked, I went to the default page under localhost where you have about 10 different languages listed and I selected English as my language. All was well. I was able to get into phpMyAdmin and all :D

Now, I went to /opt/lampp and ran the following command:
Code: Select all
sudo chown ysg:ysg -R htdocs


Basically, I want to be able to modify this directory without being root, since that's where I'm going to do most of my development (if I'm screwing something up, please tell me!).

Now, after doing that, I went to localhost and I go the first page that has the 10 different languages listed and I clicked on English and then... nothing! The page would just refresh... I wouldn't see the page where I would go an see the bright orange column on the left side with phpMyAdmin or the main light orange screen with a white header at the top.

Here's the weird part:
I retraced my steps and ran this command to undo what I was doing with putting permissions in as they were:
Code: Select all
sudo chown nobody:root -R htdocs


Now, I went back to localhost and hit English and I got my usual page with the bright orange column on the left side and the main light orange screen in the middle, with the white header at the top.

Why does changing ownership of htdocs do this? Do I just have to set all of the permissions as 777 inside of htdocs?
Last edited by ysg on 27. October 2011 22:10, edited 1 time in total.
ysg
 
Posts: 13
Joined: 06. October 2011 14:33
Operating System: Ubuntu 11.04

Re: Changing ownership of htdocs

Postby JonB » 27. October 2011 16:55

The owner for htdocs needs to be nobody:root for XAMPP/LAMPP to work-- just accept that, LOL, or do the detective work. OR install a regular LAMP stack.

A good way to do what you want is create a new folder in your 'home' for the content you want. Then place a symbolic link in /opt/lampp/htdocs that points to 'your folder'. That should work the way you want. There are exceptions to that as well.

Good Luck
8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: Changing ownership of htdocs

Postby ysg » 27. October 2011 17:34

JonB wrote:The owner for htdocs needs to be nobody:root for XAMPP/LAMPP to work-- just accept that, LOL, or do the detective work. OR install a regular LAMP stack.

A good way to do what you want is create a new folder in your 'home' for the content you want. Then place a symbolic link in /opt/lampp/htdocs that points to 'your folder'. That should work the way you want. There are exceptions to that as well.

Good Luck
8)

Thanks. I'll go with the sym link solution.
ysg
 
Posts: 13
Joined: 06. October 2011 14:33
Operating System: Ubuntu 11.04


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 8 guests