• Plesk Uservoice will be deprecated by October. Moving forward, all product feature requests and improvement suggestions will be managed through our new platform Plesk Productboard.
    To continue sharing your ideas and feedback, please visit features.plesk.com

Qmail queue owner:group problems

G

graynotgrey

Guest
I made a stupid mistake the other day with a shell script that recursively changed the owners and groups of files in multiple directories. I was using relative paths and going in and out of directories. There was an error in the script (I did not account for a files) and eventually I ended up changing the owner and groups of all of the files on the file system. It broke su, plesk, qmail and many other programs. I changed everything to root:root and then ran the following script to restore all of the original owners and groups;
for RPM in `rpm -qa`;do rpm --setugids $RPM;done. I also ran the same script with the --setperms, because some permissions may have been changed as well.

I then had to manually correct some other owners and groups from scripts I installed manually. Almost everything is working correctly except qmail. Messages from the system or php forms get into qmail/queue/mess but the following error appears in maillog:

deferral: Sorry,_message_has_wrong_owner._(#4.3.5)/

The files in the queue should be owned by qmailq:qmails, but some are owned by root:apache and some by root:nofiles. If I manually change the owner and groups of the messages will be sent out of the queue successfully. (I actually use qfixq)

I've read through a lot of qmail documentation and forums but I cannot determine how exactly the messages get into the queue and what should change the owner and group to qmailg:qmails but isn't because the ownshipr or permissions are incorrect.

I think it has something to do with how Plesk interacts or configures Qmail and the qmail-queue binary files. Here is what I have for owners and permissions now for those files;

ls -alF qmail-queue*
-rws--x--x 1 qmailq qmail 23408 Aug 30 19:22 qmail-queue*
-rws--x--x 1 root root 16012 Mar 27 10:16 qmail-queue.moved*
-r-xr-x--- 1 root qmail 23408 Aug 7 08:24 qmail-queue.plesk*

Does anyone have any insight? Thanks.
 
Back
Top