NamelessMC / Nameless

NamelessMC is a free, easy to use & powerful website software for your Minecraft server, which includes a large range of features.
https://namelessmc.com/
MIT License
609 stars 311 forks source link

Determine the right group for chown #3480

Open PadowYT2 opened 9 months ago

PadowYT2 commented 9 months ago

Describe the feature

This is based on https://github.com/NamelessMC/Nameless/blob/fcaa51708c23d592a92209d9ff7728f557070647/core/init.php#L43 basically, on CentOS, it is either nginx/apache and not www-data. Not sure if possible, but PHP should determine the right group

Derkades commented 9 months ago

get_current_user() should work

samerton commented 2 months ago

According to the docs, get_current_user() returns the owner of the current file as opposed to the user running the PHP process: https://www.php.net/manual/en/function.get-current-user.php