Pilerimport user switch

Issue #71 resolved
János Csárdi-Braunstein created an issue

Pilerimport doesn't use username option from piler.conf, always try to create file with piler owner in the store directory.

Comments (6)

  1. Janos SUTO repo owner

    Well, the 'username' option is for the piler daemon. The pilerimport utility is setuid to the piler user, since it has to create files under the store directory. Note that normally no other user should access the store directory.

    However it's possible to change the user in 2 steps:

    1. chown the store directory to "newuser"
    2. chown newuser /path/to/pilerimport, chmod 6511 /path/to/pilerimport

    Btw. why do you want to change the user?

  2. János Csárdi-Braunstein reporter

    My exim run as mail user, and i use pilerimport with pipe, but exim can't switch to another user.

  3. Janos SUTO repo owner

    OK, I see. But wait a second: pilerimport is setuid to "piler", isn't it? If it is not, and you can't make it to setuid for some reason, then you have to

    chown -R mail /var/piler/store chmod -s /usr/local/bin/pilerimport

  4. Log in to comment