Gentoo Archives: gentoo-user

From: laurent <laurent@××××××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] ftp user, local user, apache group
Date: Wed, 14 Oct 2009 17:46:10
Message-Id: 4AD60E46.60102@logiquefloue.org
In Reply to: Re: [gentoo-user] ftp user, local user, apache group by Frank Steinmetzger
1 Frank Steinmetzger a écrit :
2 > Am Freitag, 9. Oktober 2009 schrieb laurent:
3 >
4 >> Hi,
5 >>
6 >> Now I've setup vsftpd with local user.
7 >> For exemple I log with the user laurent, I create a folder via ftp.
8 >>
9 >> This folder is own by laurent, so it's not exessible via apache.
10 >> How could I make that, like put laurent in a apache group?
11 >>
12 >
13 > My setup is a combination of apache and pure-ftpd. My user is member of the
14 > apache group, and I have set my home dir to
15 >
16 > $ ls -ld /home/frank
17 > drwxr-x--- 115 frank apache 16384 2009-10-09 22:30 frank
18 >
19 > That way apache can enter my directory to get into ~/public_html, but other
20 > users (such as guests, it's my laptop) cannot.
21 >
22 > If I log into pure-ftpd with a local user account, it puts me into the
23 > respective user's home. Anonymous logins are made for user "ftp", which is
24 > set up in /home/ftp:
25 >
26 > $ ls -ld /home/ftp
27 > dr-xrwx--- 4 ftp users 4096 2009-09-19 19:45 ftp
28 >
29 > $ ls -ld /home/ftp/incoming
30 > drwxrwxr-x 2 ftp users 4096 2009-09-16 23:58 /home/ftp/incoming/
31 >
32 > This setup allows me as the "admin user" to have control over the files in the
33 > anonymous ftp root, and anonymous users may only upload stuff in the incoming
34 > directory.
35 >
36 >
37 >> I don't really know how to play with groups and user, any good tutorial
38 >> on that?
39 >>
40 >
41 > Just search for it, keywords such as file permissions chown may help:
42 > http://www.overclock.net/linux-unix/513350-linux-file-permissions-executables-howto.html
43 > http://penguinpetes.com/b2evo/index.php?title=chmod_squad_howto_use_linux_file_permiss
44 >
45 > The latter is more informative on how to use groups in detail.
46 >
47 Hi Franck
48
49 Ok, after reading that I guess: I could create a 'connects' group and
50 put my apache user in it.
51 So apache will have control over the files in www own by
52 apache:connects. set to 760 recursively, for exemple.
53
54 And then add other local user to the connector group. Then as they will
55 be able to connect on ftp as a local user they will be able to read
56 write files that apache will be able to execute.
57
58 I'm gonna do that now :)
59 thx
60 Laurent

Replies

Subject Author
Re: [gentoo-user] ftp user, local user, apache group laurent <laurent@××××××××××××.org>