[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vps-mail] Sigh... more permissions problems



Everything was going fine, until.....

I am running a routine via savelogs that rotates various log
files each day via cron.

The problem occurs AFTER savelogs is run, when the log files
that have been rotated are recreated. The problem has shown
up with procmail.log and with a file I'll call
user1.log, which is created by the .procmailrc for that
specific user.

Basically, these log files should be created and written to
with procmail.

I get two errors.

1. The new procmail.log is created with
permissions set at 644, and I get a procmail.log filled with
entries like this:

procmail: Error while writing to "/var/log/procmail.log"

(but not for all entries - some things get written, some
don't) There is NO Dropprivs directive in my procmailrc
files, but there ARE log file specifications for .procmailrc
files under individual users, like this:
LOGFILE=/var/log/procmail.log

So I think that is what is going on is simply that the
procmail running under the individual users doesn't have
permissions to write to
the main procmail.log

I suppose I can fix this with shell script after savelogs
that runs these commands:

touch /var/log/procmail.log
chmod 644 /var/log/procmail.log

But I'm wondering if there is a more efficient way to do
this.

2. The other error message looks like this:

cannot create /var/mail/archives/users/user1.backup: permission denied

The problem is this - some of the user .procmailrc files are
configured to send a copy of email to a backup file, with a
command like this:
:0 c
/var/mail/archives/users/user1.backup

(The idea is that backups are created for user email to
protect against lost email, with savelogs implemented to
rotate & discard older records)

For reasons I can't figure out, the system is now unable to
create the new user1.backup after the first one has been
rotated by savelogs.

The /var/mail/archives/users directory is set to 777. (I
know, I know, it shouldn't be.... but I don't want to fix it
until I manage to figure out why user1's procmail cannot create
user1.backup in the /users/ directory, even with wide open
permissions.

Anyway, help is much appreciated.

-Abigail

======================================================================
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
Match: Format: Sort by:
Search: