[mythtv-users] File permissions for recordings

Derek Scollon mailing.lists at scotwebsolutions.com
Sun May 22 08:42:23 UTC 2005


Hello Robert,

Saturday, May 21, 2005, 10:53:36 PM, you wrote:

> On Sat, May 21, 2005 at 06:35:25PM +0100, Derek Scollon wrote:
>> Here's an odd problem. I've just recently set up MythTV for the
>> first time and have been using it for a few days. Yesterday, I
>> noticed a few programmes recorded where commercial flagging had
>> failed with an error, unable to open file.
>> 
>> I went looking in the recordings folder and thought it might be a
>> file permissions problem. mythbackend and mtd are both run at
>> startup as root and mythfrontend is run after logging in as mythtv.
>> Most of the recordings files were owned by root with file
>> permissions 644. I changed the existing files' owner and group to
>> mythtv and set the setuid and setgid bits on the folder with the
>> intention of making all new files owned by mythtv. The result is not
>> quite what I expected. Every file since then has its group as mythtv
>> but its owner is either mythtv or root in a pattern which seems
>> random, and I can no longer watch any recordings. When I select a
>> recording in mythfrontend, it takes no action when asked to play it.
>> 
>> I'm assuming this is a problem with what I've done with file and
>> folder permissions, since I can still watch TV and videos (which are
>> in a different folder). The question is, with the backend running as
>> root and the frontend running as mythtv, what should the file owner
>> and permissions be for recordings? And if the file's owner is
>> mythtv, why would either the mythtv user or root have any problem
>> accessing it?

> This doesn't answer your question, but why not run everything
> (mythbackend, mtd, mythfrontend) as the mythtv user? You shouldn't
> need to run any of this as root ...

> --Rob

You're right, of course, there's no necessity to do it this way. My reasons (both of which I realise can be worked around) are...

1. Doing it by the method used in the excellent Howto at wilsonet.com results in the backend being run automatically at boot time as root.

2. When the backend is run as the mythtv user it can't open the frontend on the DVB card. This necessitates changing the permissions on /dev/dvb/adaptor0/frontend0, which would need to be done after every reboot.

-- 
Best regards,
Derek



More information about the mythtv-users mailing list