• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS.

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