Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Aug 2005 21:42:55 +1000
From:      Norberto Meijome <freebsd@meijome.net>
To:        Carstea Catalin <carstea.catalin@gmail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Connect from distance!
Message-ID:  <42FDDCBF.4070808@meijome.net>
In-Reply-To: <dc6701ba050813013367e3cf32@mail.gmail.com>
References:  <dc6701ba050813013367e3cf32@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Carstea Catalin wrote:
> How can i "share" ( with chmod for example ) for only some users ( web 
> programmers ) only one directory where they can put his web pages.
>  Ex : "share" : /var/www/html/dir1
> for user1,user2,user3 
> If user1 make ssh on my server he can view,read,modify,remove only files 
> from /var/www/html/dir1
Hi there,

easiest, make the programmers members of the user's groups. make sure 
the /var/www/html/dir[1|2|3] directories are g+rw , and u-rwx

You'll have to add the user/group the webserver is running as to those 
user's groups too.

> Tks!
>  If exist another solution for my web programers ( secure solution ) to work 
> from distance on my web server please tell me. 
>  
> 

I suggest you don't give full ssh access, but rather access via SFTP, 
setting the user's shell to scponly (ports tree,  shells/scponly , IIRC) 
, or even better, scponlyc (chrooted version of scponly), which is part 
of the scponly port and can be built with a special flag. The users will 
  be able to upload/download files securely, edit them in their remote 
computers and upload them again. Most good quality web editing software 
understands SFTP nowadays.

Beto



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?42FDDCBF.4070808>