Score:0

Cannot execute PHP binary as non-root user in Plesk server (Linux)

us flag

I am running Plesk 18.0.44 on my Debian 9.13 server. It has multiple subscriptions and hence different users for these vhosts. I was always able to run /opt/plesk/php/7.4/bin/php -v as a vhost user (or rather some PHP commands for the applications hosted there, but php -v suffices for explaining purposes). Recently, this has stopped working with the following error message:

-su: /opt/plesk/php/7.4/bin/php: Permission denied

I don't understand that since I don't remember having changed anything about the permissions or running Plesk updates or similar. I tried adding the vhosts user group (user laravelapp in group psacln) to the php executable's permissions, so they look like this:

ls /opt/plesk/php/7.4/bin/php -al
-rwxrwxrwx 1 root psacln 5629184 Jun 16  2022 /opt/plesk/php/7.4/bin/php

I even tried setting the permissions to 777 but I just can't get it to work again. It works completely fine - as expected - when running it from root user.

What could be the possible causes for this issue and how could I troubleshoot this further?

in flag
Questions utilizing web management panels like Plesk are off topic; Debian 9 is end of life, also off topic.
Johnny avatar
us flag
In how far does that affect permission issues? @GeraldSchneider
Ginnungagap avatar
gu flag
Check all the parent folders. Also web panels are off-topic precisely because they mangle most of the system beyond recognition, including file permissions.
Johnny avatar
us flag
@Ginnungagap by parent folders you probably refer to `/opt/plesk/php/7.4`, correct? good point, I missed this one.
Score:0
us flag

I overlooked the permissions of the parent folders of the PHP executable as @Ginnungagap pointed out.

chmod 755 /opt/plesk/php

It works. I am still unsure as to why it happened in the first place.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.