Thread: Monitor for a process (not-running yet) and see who it is running as
this more of general linux question, applies ubuntu server running 12.04 (in case). if impatient, skip big, bold, red text below direct question.
i'm having problem permissions png files being served apache. files being created program /usr/bin/dot, 0 bytes, implies me user running /usr/bin/dot doesn't have proper permissions write files.
here's problem. /usr/bin/dot being run bugzilla fraction of second. don't know user running /usr/bin/dot as. without knowing that, cannot fix permissions directory or add permissions user.
how monitor process isn't running, , log details process once run (especically user , group running as)?
i might have figure out way:
wrote small bash script , named /usr/bin/mydot , gave permissions 766:
i ran:code:#!/bin/bash echo "/usr/bin/dot run $(whoami)" 1>>/tmp/dotrun.log 2>>dotrun.err /usr/bin/dot $*
i configured bugzilla run /usr/bin/mydot instead of /usr/bin/dot.code:cd /tmp touch dotrun.log touch dotrun.err chmod 666 dotrun.log chmod 666 dotrun.err
ran:
it logged:code:sudo -u ftp mydot test
i tried bugzilla run "mydot", , log looks this:code:/usr/bin/dot run ftp
notice last 2 lines don't show user, didn't work.code:/usr/bin/dot run ftp /usr/bin/dot run /usr/bin/dot run as
got better way?
Forum The Ubuntu Forum Community Ubuntu Official Flavours Support General Help [all variants] Monitor for a process (not-running yet) and see who it is running as
Ubuntu
Comments
Post a Comment