Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

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've run into a problem with Joomla. . . it cant create new folders through the Admin UI. It's a standard permissions error. I've been told to chmod all of the folders in the site to 777.

Is there a better way to go about this? Somebody said something about creating a group and adding myself and apache into it. Then give group access to those folders. . . or something like that.

Can anybody give me any specific steps. . . I'm not that familiar doing this from the terminal ?? Or should I just chmod everything to 777 ?

share|improve this question
What's the username/group of apache? You should probably chgrp the files to the apache group and make them writable by it. How are the permissions in /var/www now? – slhck Nov 8 '11 at 18:32
drwxr-xr-x 17 root root 4096 Nov 8 16:33 www as far as I know, apache is not in a group right now, and the username is 'apache'. – TuK Nov 8 '11 at 18:39
up vote 2 down vote accepted

should I just chmod everything to 777?

Definitely no. This is always a security risk.

The solution is similar to the answer I gave here. Ideally, you should create a group for all "web" users, e.g. users that need write access to /var/www. This would include you, root and apache.

sudo addgroup www-users

Then, you would add yourself and apache to this group.

sudo adduser <your-username> www-users
sudo adduser apache www-users

Finally, let's modify /var/www so that the new group can fully access it:

sudo chgrp www-users /var/www
sudo chmod –R 775 /var/www
sudo chmod g+s /var/www
share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .