0

I'm a web developer who is new to linux. I've just configured my personal laptop as a dual-boot Windows 7 / Ubuntu 12.0.4 workstation. I Installed the default Ubuntu LAMP stack through taskel per instructions here: https://help.ubuntu.com/community/ApacheMySQLPHP. Now I want to set up some web projects and map them to Apache2 virtual hosts. I am using the following tutorial to set up Apache2 virtual hosts: http://www.linode.com/wiki/index.php/Configure_apache_to_use_virtual_hosts_on_ubuntu_server.

My Linux user name is neil. I want to create the following directory: /var/www/vhosts. Each of my web projects will live in a sub-directory of /var/www/vhosts. My IDE (PhpStorm) should have write access to /var/www/vhosts so that I may create new projects directly trough the IDE. Of course my browser should be able to view each web project as well.

I do not have sufficient access privileges to create /var/www/vhosts. Obviously I can use sudo to create the directories but I don't think that will be the solution for what I need.

So here is my question, what should I set UID, GID and permissions to for the following: 1. /var/www 2. /var/www/vhosts/foo (where foo is the name of a project) 3. Apache2 4. MySQL 5. PHP 6. PhpStorm (IDE)?

Thanks in advance!

Neil Girardi
  • 4,533
  • 1
  • 28
  • 45

1 Answers1

0

If it is public facing (including on untrusted networks like public wifi), don't be lazy unless the LAMP package you're using requires specific chowning and chmoding don't mess with it. If it is only accessible to your trusted home network or only localhost then I would chmod it to 777 and call it good.

btw this should have been asked over at https://serverfault.com/ your account here is usable there.

Community
  • 1
  • 1
David
  • 388
  • 1
  • 5
  • 24