Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

How do I change the permission of file/directories such that I am able to create, edit, delete files/directories anywhere in my system? Currently I am using Ubuntu 12.04.

I tried

sudo chmod 777 -r /opt/lampp/htdocs

after installing xampp but it does not even seems to work for the htdocs folder.

Thanks

share|improve this question
2  
chmod 777 is never the right thing. What are you trying to do? You probably need to set the ownership or add a group permission on this file. What user/group does xampp run as? –  Gilles Sep 28 '12 at 23:03
    
Permanent? It can be non permanent? –  warl0ck Sep 30 '12 at 7:23
add comment

closed as not a real question by Nils, Renan, warl0ck, jasonwryan, phunehehe Oct 5 '12 at 11:42

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

4 Answers

If you want to put files in there, then either change the permissions so that YOU have write access, or use sudo. DO NOT EVER set anything on your system to permissions 777. That is read/write/execute for anyone. Now that may be your private system, but you may one day work on production systems. You don't want to learn bad habits. NEVER use that set of permissions for any file.

Just want you to learn safe habits, not trying to brow beat you.

share|improve this answer
add comment

Setting open permissions like this is usually the wrong thing to do. What leads you to believe it is the solution you want? What are you trying to do, what do you expect to happen, and what actually happens? Do you have Apache configured and running, or do you just want local access to the xampp docs? Whatever the case, it seems as if setting permissions to 777 is a bit of a sledgehammer approach.

Beyond that, your chmod syntax is incorrect:

chmod -R 777 /path

The -R flag goes before the mode specification, not after it. It is also probably a capital R and not a lower case r (but I don't use Linux so don't take my word on that - look at the manpage to get all the gory details).

share|improve this answer
add comment

First try to find the permission that you have for this folder and its subsequent files using this command : ls -lrt

Try to see if there is a sticky bit associated with it. Then change to root using : sudo su. And then give permission as : chmod +rwx filename

That aught to do it .

share|improve this answer
add comment

Read logs /var/log/apache2/ to see why apache was failing to display web pages for you.

On Ubuntu, default apache DocumentRoot directory is /var/www. (I think you can change the DocumentRoot directory by editing a file /etc/apache2/sites-enabled/000-default and restarting apache.)

share|improve this answer
add comment

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