Linux User Management and Permissions

Taking care of your Linux box.
Post Reply
waqaskhawaja
Lance Naik
Posts: 44
Joined: Thu Aug 31, 2006 8:52 pm
Location: Lahore Pakistan
Contact:

Linux User Management and Permissions

Post by waqaskhawaja »

I have configured apache and document root is /var/www/public_html. I want to have multiple ftp users access it.

I need suggestions on how should I manage the groups. Do you think it would be a good idea for www-data:www-data to own the document root and then adding all users to group www-data so they could upload files?

Please suggest.
ghulam yaseen
Naik
Posts: 68
Joined: Thu Aug 07, 2008 6:09 pm
Location: karachi

Post by ghulam yaseen »

you can use either acl or groupmod so that multiple user groups can write on same dir.

Regards,
ranatanveer
Subedar
Posts: 355
Joined: Sat May 07, 2005 11:54 am
Location: Lahore
Contact:

Post by ranatanveer »

USE SGID

like

Set the folder permissions to 2775
and set files permissions at least 664

add a group

Code: Select all

 groupadd ftpgroup 
add users like this..

Code: Select all

useradd -G ftpgroup firstuser
passwd firstuser


now tune the user from /etc/password

from

firstuser:x:563:564::/home/firstuser:/bin/bash

to

firstuser:x:563:564::/var/www/public_html:/sbin/nologin

add further users with same technique.
Regards

Rana Tanveer
+923224194457
Linux Student

For Affordable Web Development http://www.affordableprogrammers.com
http://www.qualityprogrammers.com
Post Reply