Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I installed XAMPP, but I'm not able to create or save files in htdocs folder. This is what I get to see when I try to save a file.

The document could not be saved, as it was not possible to write to /opt/lampp/htdocs/myfirstfile.php.

Check that you have write access to this file or that enough disk space is available.

share|improve this question
    
this link will help you. –  Gowtham Apr 19 at 15:32

1 Answer 1

For settings permissions you need the command chmod.

The following permissions are enough for files: sudo chmod 664 /opt/lampp/htdocs/myfirstfile.php inside a directory. For directories sudo chmod 775 /opt/lampp/htdocs is enough.

You can add -R as an option to set it from where you are and everything below but please do not open permission more than needed (even though the creator of XAMPP does not care for security).


And please use the native LAMP stack. It is a bit harder to master but it does have a decent security out of the box.

share|improve this answer
    
acer@ubuntu:~$ chmod 775 /opt/lampp/htdocs chmod: changing permissions of `/opt/lampp/htdocs': Operation not permitted :( –  Delinquent Menace Dec 1 '12 at 10:35
    
do not forget sudo ;) @DelinquentMenace –  Rinzwind Dec 1 '12 at 11:37
1  
You should do 755 instead of 775, you don't want your security breached in 2 seconds. –  Joren Sep 6 '13 at 7:51

Your Answer

 
discard

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.