Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[vdr] Bug in runvdr: running VDR as user 'vdr' doesn't work out of the box
Consider the following excerpt from runvdr:
while (true) do
su -c "$VDRCMD" $VDRUSR
This doesn't work, $VDRCMD is always run as the calling user (so most likely
as root). su should instead be called in the following way:
su $VDRUSR -c "$VDRCMD"
On my system, the su application is provided by sys-apps/shadow-4.0.3-r9.
Maybe there are other versions out there that don't need the username as
first parameter...
To see the different behaviour of both variants run as root in /root:
root # su -c "ls" vdr
[some files in /root]
-> ls is able to read the /root directory, so it's still running as root
root # su vdr -c "ls"
ls: .: Permission denied
-> now ls is correctly run as user vdr, so access to /root is denied.
Robert
P.S.: Now that my VDR finally run as vdr, I also had to add the user vdr to
group video so he is allowed to access /dev/v4l/video0. Furthermore, I had to
change the /dev/dvb/* permissions, but this is distribution-specific (I'm
using Gentoo 1.4). I did not use the Gentoo VDR ebuilds but compiled it the
traditional way. Maybe the ebuild would have set the permissions correctly...
--
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe vdr" as subject.
Home |
Main Index |
Thread Index