Page 1 of 1

[SOLVED] Changing ownership of htdocs

PostPosted: 27. October 2011 16:46
by ysg
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?

Re: Changing ownership of htdocs

PostPosted: 27. October 2011 16:55
by JonB
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)

Re: Changing ownership of htdocs

PostPosted: 27. October 2011 17:34
by ysg
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.