Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 installed LAMP server on Ubuntu 13.04 using this tutorial word to word. It worked nicely. But I am hardly able to understand these steps :

$ sudo usermod -a -G www-data your_user
$ sudo chgrp -R www-data /var/www
$ sudo chmod -R g+w /var/www
$ sudo apt-get install php5-curl
$ sudo a2enmod rewrite
  1. What is this usermod?
  2. Why it is used here?
  3. Why is the group changed?
  4. What is this a2enmod?
  5. How secure is this installation?
  6. Is there anything else I have to do to make it more secure?
  7. If the original author has already taken care of security then how did he do it?
  8. Why did he change AllowOverride None to AllowOverride All?
share|improve this question

closed as off-topic by Ladadadada, EEAA, Wesley, mdpc, jscott Aug 1 '13 at 18:28

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions must demonstrate a minimal understanding of the problem being solved. Try including attempted solutions, why they didn't work, and the expected results. See How can I ask better questions on Server Fault? for further guidance." – EEAA, Wesley, mdpc, jscott
If this question can be reworded to fit the rules in the help center, please edit the question.

Please be aware your question does not meet most of the quality requirements and will likely be closed. All of your questions are easily answerable by reading some documentation. Please improve your future questions. – kce Aug 1 '13 at 17:40
So let me get this straight: You (apparently) read no documentation other than a tutorial, typed in a bunch of commands with no clear understanding of what they do, and now you want Server Fault to tell you what thy all mean? OK... The thing you can do to make your environment more secure is to STOP AND THINK, preferably BEFORE you start typing commands. – voretaq7 Aug 1 '13 at 17:46
up vote 7 down vote accepted
  • What is this usermod? Why is it used here?

Usermod is a tool for configuring and modify existing user accounts. In this example you are adding your_user to the www-data group. Typically the www-data group is used by the web server (see What are the best linux permissions to use for my website?).

  • Why is the group changed?

You're assigning the www-data group membership of everything inside the /var/www directory. Likely because that's the account used by the web server.

  • What is this a2enmod?

a2enmod is used to enable apache modules. In this instance, you are enabling mod_rewrite.

  • How secure is this installation?

This question is so broad it is off-topic.

  • If the original author has already taken care of security then how did he do it?

This is a slightly less broad question but it's still off-topic. Security is not something you just "take care of". It's a process. You'll need to read and understand your documentation and come back and ask specific questions related to that topic.

- Why did he change AllowOverride None to AllowOverride All?

AllowOveride. "When this directive is set to All, then any directive which has the .htaccess Context is allowed in .htaccess files." - Right from the documentation. It's enabling the use of .htaccess.

share|improve this answer
You may be too nice. Good answer. – mfinni Aug 1 '13 at 17:47
Look at all that documentation! swoon – voretaq7 Aug 1 '13 at 17:51
Thank you. Got all answers. – user58859 Aug 1 '13 at 18:05

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