• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Problem with email piping & permissions

S

Symos

Guest
Hi there

I'm trying to setup piping from an email account to a script.
I've changed the /var/qmail/mailnames/<domain>/<account>/.qmail file and added a line which does the piping to my script, which is under the httpdocs folder.

The piping works, but the mail server isn't allowed access to the script and returns "Permission denied" although the file's permissions are set to 755.

What I know so far:
-The problem lies with httpdocs folder's permissions. If I add execute permissions for "others" to httpdocs, the piping works ok. That's not something want to do though, so I'm looking for another solution.
-httpdocs belongs to the psaserv group and the group has execute permissions. I have added user "popuser" (responsible for the piping, at least that's what "whoami" showed) to the psaserv group but it still gives the "Permissions denied" error.
-If I login as root and run the script from the shell as popuser (using sudo) it works! No permissions denied problem there.
-I've got other files and folders under httpdocs set to 755 or 777 and they can be accessed ok by other scripts. But if I redirect the email piping to them, I still get the error.

So it seems that it's popuser specifically that isn't allowed access to any file under httpdocs (even if the file is 755) unless I chmod the httpdocs folder to 755.
On the other hand, if I run the script as popuser using sudo, it works so it seems that there's only a problem with the piping.

I'm really getting confused here!

Any help would be much appreciated. Thanks in advance.

George
 
Back
Top