RSS
 

Managing Clients with Linux

25 Jul

On my hosting provider account, I want to seperate each client from the rest of my web sites.

Since I can create shell users, I can manage this seperation using groups:

myusername (I’m the “admin”) Ok, not REALLY an admin, but for this purpose I am.

I have two clients:

client1 and client2

I also have about 15 other web sites I run (which I don’t want my clients to have read/write access to).

/home/myusername/domain1.com
/home/myusername/domain2.com
/home/myusername/domainN.com
/home/myusername/client1.com
/home/myusername/client2.com

So, what I did was create two groups:

Syntax: user:group
client1:client1
client2:client2

And then I add myself to both groups (client1 and client2).

Then I set the umask for each client to 002 (~/.bash_profile or ~/.bashrc).
I also use ‘newgrp client1‘ command for each client (in this case ‘client1′). This will make the default file ownership client1.client1 and permission 664. (because I’m the group, I can also read/write).

so then I symlink their domain to their home directory:

/home/client1/client1.com -> /home/myusername/client1.com
And type “chgrp -R client1.client1″ if files already exist.
also: “find . type -f chmod 664 {} \;” and “find . type -d chmod 775 {} \;” inside their domain directory so both of us can read/write to it.

Then I change my own home directory to drwxr-x–x so they can’t read my stuff (I also change my home group to myusername.myusername.

Here’s a nice little tutorial on linux administration.

VN:F [1.9.3_1094]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.3_1094]
Rating: 0 (from 0 votes)
Retweet
 
Comments Off

Posted in Advocacy, Development

 

Comments are closed.