stig wrote:
> hi.
> first of all, thanks to you that have answered my previous questions.
>
> now.
> to simplify the case,
> lets assume i have 3 users A, B and C.
> all are allowed to login wia ftp but not terminal (/sbin/nologin).
>
> on the ftp i have one (1) directory that contains a number of files, but
> lets call them file1, file2 and file3.
>
> now i would like A to be able to see and download file1, and file2.
> A should not be able to browse the directory for other files then file1
> and file2, even though the other files are there. and A should not be
> able to download file3 by guessing the name. then in the same manner for
> B and C.
>
> what i am aiming for is:
> user file1 file2 file3
> A b+r b+r none
> B b+r none b+r
> C none b+r b+r
Use groups. Set the files' ownerships based on groups. Let's say:
File Group
A A
B B
C C
Then you set additional groups for each user based on which file access you
want them to have.
I suggest this because a particular user can belong to a long list of
groups, so this is a way to get the kind of flexible permissions you want.
Plus, if you want to change a user's access later, you can simply remove
the specific group permission from the account.
File permissions are not particularly flexible in Linux/Unix. They can
belong to one user and one group. But users can belong to many groups.
Connect the users to the files using user group membership.
--
Paul Lutus
http://www.arachnoid.com