[mythtv-users] Mythexport output files wrong permissions

John Veness John.Veness.mythtv at pelago.org.uk
Fri May 6 11:24:09 UTC 2016


On 06/05/2016 12:07, Michael T. Dean wrote:
> On 05/06/2016 06:52 AM, John Veness wrote:
>> I have just upgraded my combined BE/FE from Ubuntu 12.04 to 14.04 (I 
>> realise I am behind the times!) Before the change, files output from 
>> mythexport had permissions 666 (-rw-rw-rw-). Files output since the 
>> upgrade have permissions 600 (-rw-------). This means that the apache 
>> process that serves the output files, via an RSS feed, cannot read 
>> the files and so they cannot be downloaded.
>>
>> I was wondering if anyone else was having this problem, and knew how 
>> to solve it?
>>
>> By adding debugging messages to mythexport-daemon, as far as I can 
>> see, the umask changes after startDaemon, which calls 
>> Proc::Daemon::Init. According to the documentation for the latter, 
>> changing the umask is normal behaviour. But as I say, I never had 
>> this problem with 12.04.
>>
>
> Just a guess, but I'd expect that the umask in the environment which 
> is used to start mythexport (or used to start the process that's 
> starting mythexport) has changed.
>
> Mike 

Thanks Mike. Yes, I'm pretty sure umask is involved, but I'm having 
trouble tracking down exactly where, or why this has changed since 12.04.

/usr/bin/mythexport-daemon is the script that actually creates the 
output files, as far as I can tell, along with the help of various perl 
modules stored in /usr/share/mythexport/configs/. mythexport-daemon is 
normally started by /etc/init.d/mythexport, which uses start-stop-daemon 
to make it start as user mythtv. Indeed, the output files it creates are 
owned by mythtv, group mythtv.

The mythtv user itself has no particular umask set in .profile or 
similar, but I understand that even if it did, that is ignored by 
processes called from init.d scripts.

There's nothing in the init.d script or in mythexport-daemon which 
refers to umask.

If I do "sudo service mythexport stop" and do "sudo mythexport-daemon" 
(in other words, bypass the init.d script), things are much the same, 
except the files are owned by root, not mythtv.

Unfortunately, mythexport development seems to have stopped in recent 
years, and the package hasn't really changed (other than renamed 
dependencies) since 2012 as far as I can see from 
https://launchpad.net/ubuntu/+source/mythexport . I also notice it has 
been demoted from universe to multiverse, maybe because of the lack of 
development. There are several bugs listed in 
https://bugs.launchpad.net/ubuntu/+source/mythexport and 
https://bugs.launchpad.net/mythexport which haven't been fixed for 
years, although I have done some local patches.

It's a shame, because mythexport, for me, was the best way to get 
recordings (in my case, DVB-T radio recordings) automatically appear on 
my phone with very little manual work. I'm aware of mythpodcaster, but 
haven't had a chance to set that up, especially with the Docker 
requirements.

It would be great if someone could pick up mythexport, fix the bugs, and 
maybe develop it more.

John

-- 
John Veness, MythTV user, UK, DVB-T

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20160506/aee1fa5b/attachment.html>


More information about the mythtv-users mailing list