On Fri, May 18, 2007 at 11:09:31PM -0400, Joshua Schairbaum wrote:> nohup su -c "/usr/bin/ruby rv_harness.rb 3301 127.0.0.1 < /dev/null 2>&1 > > /dev/null" www-data < /dev/null 2>&1 >> /var/log/rv.log & > > Obviously, permissions are a weakpoint for me, so I''d appreciate any help`su -c` executes the bit you have inside the quotations as a different user; everything else (including the redirection you''re using to rv.log) gets executed as your regular user. So, /var/log/rv.log needs to be writeable by whatever user is running that command. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://rubyforge.org/pipermail/camping-list/attachments/20070518/76643564/attachment.bin
I''m trying to setup RV and cannot get it started. I keep getting: Permission Denied : /var/log/rv.log I''ve tried running it as root to test and also using www-data and chrgrp of rv.log to www-data. Here''s the output: nohup su -c "/usr/bin/ruby rv_harness.rb 3301 127.0.0.1 < /dev/null 2>&1 > /dev/null" www-data < /dev/null 2>&1 >> /var/log/rv.log & If I run run the section in quotations, it works. I''m the call to /dev/null is the stream for the mongrel log, and the second one outside the quotations is for the rv log. Obviously, permissions are a weakpoint for me, so I''d appreciate any help that someone could give. Thanks, Josh -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/camping-list/attachments/20070518/bb3a1d0f/attachment.html
Brendan, Thanks for the help, but I still can''t get it cranked up... Some relevant bits: ls -a /var/log #=> -rw-rw-r-- 1 root jschairb 8352 2007-05-18 23:33 rv.log Obviously, I''m jschairb... but I''m calling the script like this: sudo /etc/init.d/rv start I''ve tried having root be the group as well. Thanks, Josh On 5/18/07, Brendan Taylor <whateley at gmail.com> wrote:> > On Fri, May 18, 2007 at 11:09:31PM -0400, Joshua Schairbaum wrote: > > nohup su -c "/usr/bin/ruby rv_harness.rb 3301 127.0.0.1 < /dev/null 2>&1 > > > > /dev/null" www-data < /dev/null 2>&1 >> /var/log/rv.log & > > > > Obviously, permissions are a weakpoint for me, so I''d appreciate any > help > > `su -c` executes the bit you have inside the quotations as a different > user; everything else (including the redirection you''re using to rv.log) > gets executed as your regular user. So, /var/log/rv.log needs to be > writeable > by whatever user is running that command. > > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list > >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/camping-list/attachments/20070518/07d2253b/attachment.html