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 am completely new to ubuntu... THough I installed htdocs and give it permission using command

chmod -R 777 /opt/lampp/htdocs.

It works fine. But I wish to avoid it doing again and again. Their after I followed tutorial on http://superuser.com/a/268996 but it doesn't work for me... as I tried ls -ld /opt/lampp/htdocs it gives me following.

drwxrwsr-x 8 nobody shadaab 4096 current-date-n-time /opt/lampp/htdocs .. As I continued with group shadaab. But it doesn't work. Again every time I have to use command chmod -R 777 /opt/lampp/htdocs if I copy something to my folder. please help.

If I run 'localhost' it works fine. but if I use 'localhost/project' it gives 'access forbidden error.'

share|improve this question
    
You should not give your web root 777 permissions at all. If you tell us what you are trying to achieve with this, we may be able to tell you much better and safer ways of accomplishing it. (Or that question might answer this for you.) –  Eliah Kagan Aug 1 '13 at 21:46
    
actually, i just answered very similar question here: (askubuntu.com/questions/327588/…). –  Dee Aug 2 '13 at 6:55

2 Answers 2

This link contains step by step solution for your problem. (See method 2)

share|improve this answer

You can try this:

`sudo -s` 

sudo chmod 777 -R /opt/lampp/htdocs

You can also this:

sudo chmod -R 755 /opt/lampp/htdocs

sudo chown -R www-data:www-data  /opt/lampp/htdocs
share|improve this answer
1  
Giving a web root 777 permissions is a very bad idea. See Why should /var/www not have chmod 777 for why. (Also, it's not necessary to issue sudo twice; if you prepend sudo to the beginning of a command, that command does not generally need to be run in a root shell. So the first sudo -s is unneccessary. But this is minor, compared to the problems associated with chmoding web-facing data directories to 777.) Although the question is asking about how to do this, any answer should mention why not to. –  Eliah Kagan Aug 1 '13 at 21:45

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.