1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Qmail queue owner:group problems

Discussion in 'Plesk for Linux - 8.x and Older' started by graynotgrey, Sep 22, 2007.

  1. graynotgrey

    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.