Wrong group name for user after PHP file upload

SYSTEM INFORMATION
OS type and version AlmaLinux 8.9
Webmin version 2.105
Usermin version 2.005
Virtualmin version 7.9.0
Theme version 21.09.5
Package updates All installed packages are up to date

Hello everyone,

Whenever a file is uploaded to a specific user’s public_html directory, the group name for that file is incorrect; it shows up as another username for the group.

So for example, instead of this:

filename.jpg user: rightUser | group: rightUser

I get this:

filename.jpg user: rightUser | group: anotherUser

To get an idea of what I’m experiencing, see the the following link, but I’m not sure if the solution posted there is the right one for me.

Thank you in advance!

If the group or user is the Apache user (which is what that link is showing with www-data), then it means you’ve installed mod_php and shouldn’t have.

Hi Joe,

Thanks for writing.

The user/group is actually another virtual host site, not Apache in my case.

So its like this:

filename.jpg user: site_1 | group: site_3

Instead of being:

filename.jpg user: site_1 | group: site_1

Update:

So after going into the PHP-FPM configuration file for the virtual host in question, ‘group’ and ‘listen.group’ was set to another virtual host.

It was like this:

user = site_1
group = site_3
listen.owner = site_1
listen.group = site_3

I edited the config file as follows:

user = site_1
group = site_1
listen.owner = site_1
listen.group = site_1

Then restarted PHP-FPM and attempted to upload a file, then went to check if the group name was correct for the uploaded file, and this time it was. I’m not sure why or how though the group names in the config file was altered/changed to another virtual host to begin with.

If you go to edit virtual server is the admin user and group correct?

Yes, they’re correct.

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.