Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I recently installed Lampp server (version 1.7.7) so I went to my local folder, which I believe is in /opt/lampp/htdocs because that's where I've installed my server in, and wanted to create a folder where I can put my projects in, but I couldn't because the option in the right-click menu isn't even available. SO please any help would be very apreciated :)

share|improve this question
Why don't you put your projects folder in your home directory? – Aaron Apr 9 '12 at 19:35
That would be awsome if I know how to ! – Alfa9Dev Apr 10 '12 at 14:59
up vote 1 down vote accepted

First off, i'd do what others have suggested and point your browser at your home folder for the project, but to answer your question....

It's not available because your user doesn't have write access to it, you could...

  • give your self access

    sudo chown yourUser:webuser /opt/lampp/htdocs/ sudo chmod 755 /opt/lampp/htdocs/

  • create the directory from the command line

    sudo mkdir /opt/lampp/htdocs/your_project sudo chown yourUser:webuser /opt/lampp/htdocs/your_project sudo chmod 755 /opt/lampp/htdocs/your_project

Note on the chown one, check the webuser, probably www-data, but i've seen it as apache

share|improve this answer
Yes that worked, now I can change/edit/remove/update anything in that perticular forlder, meaning htdocs, but as soon as I browsed to a php file that is supposed to say "Hello world", I got these errors isntead : Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0; Fatal error: Unknown: Failed opening required '/opt/lampp/htdocs/Alfa9Dev/test.php' (include_path='.:/opt/lampp/lib/php') in Unknown on line 0 Help ????? – Alfa9Dev Apr 10 '12 at 9:36
Try the same previous commands with -R sudo chmod -R ... or make sure you got the right web group – geermc4 Apr 10 '12 at 17:35

This is my personal, unsafe(see following) solution. But is fast too.

Open a terminal window, Use sudo chmod 777 -r /opt/lampp/htdocs/ command.

Now, you and everyone can Create Read Update Delete + Execute files / folders under /opt/lampp/htdocs.

More information about Chmod can be found at:

share|improve this answer
This command didn't work, it gave me this error : chmod: cannot access 777': No such file or directory` ?? – Alfa9Dev Apr 10 '12 at 9:34

The safest way to use you projects would be simply to store your files elsewhere and Just keep links to these files in your projects folder.

share|improve this answer

Change your DocumentRoot and place it in, for example, /home/your-name/my_websites folder

share|improve this answer
sudo gedit /etc/apache2/sites-available/default ... change DocumentRoot /var/www into /home/your_name/www – Fero May 4 '12 at 22:59
I recommend editing your answer itself to include that information. Also, please note that you should run gksu gedit or gksudo gedit rather than sudo gedit (this explains why). – Eliah Kagan Sep 1 '12 at 16:56

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.