Groups, Permissions, etc.

Associate
Joined
2 Sep 2007
Posts
2,013
Hi All

Trying to setup a webdev group and give a user permissions to /var/www/html.

1) adduser jbloggs (created user)
2) groupadd webdev (created group)
3) chgrp -R webdev /var/www/html
4) chmod -R g+w /var/www/html
5) useradd -G webdev jbloggs

Why can't the user jbloggs edit anything in /var/www/html?
 
Sorry all worked it out. I had to do: -

usermod -a -G webdev jbloggs

Why is this? Why didn't useradd -G webdev jbloggs work? One more question how to I restrict jbloggs from only seeing /var/www/html so when he logs in using WinSCP that folder is only shown?
 
In order to be able to access and transfer files, etc, the user will need access to certain parts of the system (like /bin and /usr).

The method I've proposed isn't perfect as they will be able to navigate away from their home directory if they know where they're going but unless he is conversant with Linux and your system it is fairly close to what you want.

FTP is far more geared to what you're describing,
 
We live and learn it would seem...

Found this and it's perfect for what you're describing. If you need a hand setting it up, let me know where you get stuck. The setup isn't easy but it's EXACTLY what you were asking for and the documentation is good.

chroot
 
Back
Top Bottom