0

How can I find out as what user a command executes? (I'm running Ubuntu, but I suspect the answer applies to Unix in general).

What I'm trying to do is get msmtp running and logging to /var/log/msmtp. I've set the owner and group of that file to mail, then added my user to the mail group via sudo adduser dandv mail:

$ ls -al /var/log/msmtp.log
-rw-rw---- 1 mail mail 0 Jul 24 18:45 /var/log/msmtp.log
$ groups dandv
dandv : dandv mail sudo

Yet when when I run

cat testmail | msmtp [email protected] -v

I get a permission denied:

msmtp: cannot log to /var/log/msmtp.log: cannot open: Permission denied

What is msmtp's problem?

Gilles 'SO- stop being evil'
  • 807,993
  • 194
  • 1,674
  • 2,175
Dan Dascalescu
  • 7,519
  • 5
  • 19
  • 25

1 Answers1

0

Uh. Apparently I had to logout and login again for my user's addition to the mail group to take effect. Lame.

Dan Dascalescu
  • 7,519
  • 5
  • 19
  • 25