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