Re: [Proftpd-user] [SPAM] Re: Proftpd with SQL and problem with groups

[email protected] Sat, 11 Mar 2023 22:37:21 +0100
Newsgroups gmane.network.proftpd.user
Message-ID <[email protected]>
> 
> Thanks.  In the provided logs, we see:
> 
>   proftpd[23660] test3-ubuntu18: retrieved UID 2025 for user 'pawel'
>   proftpd[23660] test3-ubuntu18: retrieved group 'default' for GID 2001
>   proftpd[23660] test3-ubuntu18: retrieved group IDs: 2001, 2021
> 
> This means that the primary GID for the session is 2001.   And as we
> see on the folder permissions:
> 
>   root@test3-ubuntu18:/srv/ftp# ls -l
>   total 3
>   drwxrwxr-x 2 2026 2001 3 Mar 10 00:03 bartek
>   drwxrwxr-x 2 2024 2001 3 Mar 10 00:43 karol
>   drwxrwxr-x 2 2025 2001 3 Mar  9 00:45 pawel
>   drwxrwxr-x 2 2022 2001 4 Mar  9 00:29 piotrek
>   drwxrwxr-x 2 2023 2001 3 Mar  8 23:46 tomek
> 
> All of these folders (including /srv/ftp/karol) allow
> read/write/execute permissions to GID 2001.
> 
> How does user "pawel" come to have a primary GID of 2001?  In your
> mod_sql configuration, you are using:
> 
>   SQLUserInfo             users userid passwd uid gid homedir shell
>   SQLGroupInfo            groups groupname gid members
> 
> In this case, we need to look at the users.gid value for user "pawel":
> 
>   |  5 | pawel   | 2025 | 2001 | ... | /srv/ftp/pawel   |
> 
> The rows for these users, in the "users" table, all have a GID value
> of 2001.  This is why, I suspect, your users have unexpected access to
> these directories.
> 
> Hope this helps,
> TJ

I've changed permission to folders for 770.
I've also changed pawel's and karol's group to theirs individual.
And ? ok - I can't enter as pawel to karol's folder BUT I also can't 
enter to piotrek's folder - but I should. Pawel and Piotrek are in the 
same group 2021.

Summary: it looks like permissions are working only from Linux folders 
permissions perspective. Additional groups set in MYsql don't work.

Or tell me please what folders permission should be ?






_______________________________________________
ProFTPD Users List   <[email protected]>
Unsubscribe problems?
http://www.proftpd.org/list-unsub.html