0

I setup a LAMP stack on a dedicated server. There is a root user and a user named user1 with sudo privileges.

I usually put all my websites inside the /home/sites dir, and I don't know if it's better to: - assign wrx privileges to user1 - create another user and assign to it wrx privileges

I'm following the guide of @Tom: https://serverfault.com/a/65416

Thanks

  • The answer to this depends on what you're wanting to do with this LAMP stack. Are you administering a dedicated hosting site where you don't want one user to see/interact with another's files? Is there a programming reason for separating the data (e.g., one site allows uploads that you need to sequester somewhere)? Or maybe it's something else. Answer that and you will have answered your own question... – Thomas N Apr 25 '16 at 20:43
  • I want to administrate every websites (I'm a developer) by myself, nobody will have access to the server but I have to provide some ftp accounts to some of my customers that need to upload files to the websites that I build for them – Oscar Fanelli Apr 25 '16 at 21:29

1 Answers1

0

The easiest thing that springs into my mind is to create a different user for each customer: customer1, customer2, etc. and enable per-user directories in the Apache config:

Include conf/extra/httpd-userdir.conf 

Then you can create each customer's site in their /home/customerx/public_html directory.

After that, you simple give them FTP access to their homedir.

dr_
  • 1,035
  • 11
  • 19
  • And each user should be added to the `www-pub` group (as described here: http://serverfault.com/questions/6895/whats-the-best-way-of-handling-permissions-for-apache2s-user-www-data-in-var/65416#65416)? – Oscar Fanelli Apr 26 '16 at 17:47
  • That's not necessary as everyone is running their own site from their homedir. – dr_ Apr 26 '16 at 18:06