[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [vps-mail] Bayes --force-expire problem
- Subject: RE: [vps-mail] Bayes --force-expire problem
- From: "Jim Smith" <maillists@xxxxxxxxxxxxxxxx>
- Date: Sat, 8 May 2004 22:38:55 -0400
Scott,
I tried your script but without success. I understand to run su to change
the privileges. However, when it runs "sa-learn --force-expire" it still
tries to force-expire the /root/.spamassassin/ files instead of the
/home/$USER/.spamassassin/ files. It errors out with a "Permission denied"
message. Even when I cd to the correct directory, it still tries to expire
the root SA files. Any suggestions?
Thanks,
Jim Smith
> -----Original Message-----
> From: owner-vps-mail@xxxxxxxxxxxx
> [mailto:owner-vps-mail@xxxxxxxxxxxx] On Behalf Of Scott Wiersdorf
> Sent: Thursday, April 29, 2004 6:11 PM
> To: vps-mail@xxxxxxxxxxxx
> Subject: Re: [vps-mail] Bayes --force-expire problem
>
> On Thu, Apr 29, 2004 at 05:55:26PM -0400, Jim Smith wrote:
> > For anyone else with a similar problem to this, I figured
> I'll share
> > the solution. It was triggered from Abigail and Scott's
> discussion on
> > permissions. When I log in as root and run sa-learn
> --force-expire, it
> > does the expire as it is suppose to. However, because I'm
> logged in as
> > root, it naturally leaves the owner as root instead of
> jimsmith. If I
> > had changed it back from root to jimsmith, I'm sure it
> would have been
> > fine. However, now I know for next time.
>
> Here's a little shell script you could run to expire a list of users:
>
> <snip>
> #!/bin/sh
> for user in joe bob sally; do su -m $user -c "sa-learn
> --force-expire"; done </snip>
>
> The 'su -m $user' drops privileges to that userid (as if you
> had logged in as them, even if they don't have shell access).
>
> You could put that in a file and run it from cron once in a while.
> That way you won't get the root problems if you forget to
> chown their file back.
>
> Scott
> --
> Scott Wiersdorf
> scottw@xxxxxxxxxxxx
> ======================================================================
> This is <vps-mail@xxxxxxxxxxxx> <http://www.perlcode.org/lists/>
> Before posting a question, please search the archives (see above URL).
>
======================================================================
This is <vps-mail@xxxxxxxxxxxx> <http://www.perlcode.org/lists/>
Before posting a question, please search the archives (see above URL).
Main Index |
Thread Index