Ubuntu – in ubuntu how do i give theself full access permissions to one directory

Ubuntuubuntu-9.10

i have ubuntu 9.10 and there is one directory that i work with which is the www directory for web building. what do i type into the terminal to allow me to add,delete,modify files witout having to sudo everytime?

thanks

Best Answer

If you make yourself the owner of the directory used by the webserver, chances are you will experience troubles and - at worst - the webserver will stop to run. Whenever possible, avoid to change owners and permission of system directories and files (see my second alternative proposal). If you still want to use the CLI but can't really suffer to type "sudo " in front to your commands, you could however...

Include yourself in the group that folder is owned by, and make sure group permission is W

ls -l www #let you spot what's the group owning the directory
usermod -a -G www_group laddesign #substitute www_group!
chmod -R g=w www #set the group permissions recursively to write

If you are a GUI person, you can alternatively open the file navigator with gksudo

See the ubuntu wiki for more information and how-to.

Related Question