On 14 June 2017 at 11:33, Markus Rosjat <ros...@ghweb.de> wrote:
> Hi there,
>
> I want to build an sftp environment where the user is chrooted to his home
> dir. So far so good but then again the user might need access to a webserver
> resource like /var/www/htdocs/some_dir
>
> As far as I understand a symlink doesnt work in the chroot setup and Im not
> quiet sure how to achieve this.
>
> I could simply make /var/www/htdocs/some_dir the home dir of the user but Im
> not sure if this is the recommended way.
>
> so once again adivce  is helpful :)
>
> regards
>
> --
> Markus Rosjat    fon: +49 351 8107223    mail: ros...@ghweb.de
>
> G+H Webservice GbR Gorzolla, Herrmann
> Königsbrücker Str. 70, 01099 Dresden
>
> http://www.ghweb.de
> fon: +49 351 8107220   fax: +49 351 8107227
>
> Bitte prüfen Sie, ob diese Mail wirklich ausgedruckt werden muss! Before you
> print it, think about your responsibility and commitment to the ENVIRONMENT
>

Hi,

here's the NFS solution you were after:
$ grep 127.0.0.1 /etc/exports
/home/store/music -ro -mapall=extuser1 127.0.0.1
/home/store/not_sorted -ro -mapall=extuser1 127.0.0.1

and chroot /home/$user as usual. Now the extuser1 has an read only
access to certain shares.

Hackish? Definitely. Use at your own risk.

--
Regards,
Ville

Reply via email to