<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jun 6, 2023 at 7:01 PM James Abernathy <<a href="mailto:jfabernathy@gmail.com">jfabernathy@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">I'm trying to create my own user job in mythtv, built from sendTVtoNAS. It works if I run it from the console with the parameters it would be passed from the database as arguments. <div><br></div><div>However, if I run it from mythfrontend. it gets queued but when it shows complete without error, it really hasn't worked. I have some dummy echoes to a log file that happen immediately on start of the .sh and there isn't even a log file.</div><div><br></div><div>It sounds like a permissions issue but I'm not sure where to check. The .sh file is in /usr/local/bin with +x on everyone. The workdir for the command is in /home/jim/Videos that has permissions 777. User jim is part of group mythtv. I'm assuming that the background userjobs run as user mythtv.</div><div><br></div><div>When I look at the journalctl output it shows:</div><div><br></div><div><span style="font-family:monospace"><span style="color:rgb(0,0,0)">Jun 06 17:53:56 ubuntu-mythtv mythbackend[1004]: mythbackend[1004]: I </span><span style="font-weight:bold;color:rgb(255,84,84)">UserJob</span><span style="color:rgb(0,0,0)">_25 jobqueue.cpp:2433 (Do</span><span style="font-weight:bold;color:rgb(255,84,84)">UserJob</span><span style="color:rgb(0,0,0)">Thread) JobQueue: Started sendTVtoNAS for "Mission: Impossible Rogue</span><br> Nation" recorded from channel 15009 at 2023-06-06T00:00:00Z
<br>Jun 06 17:53:56 ubuntu-mythtv mythbackend[1004]: mythbackend[1004]: I <span style="font-weight:bold;color:rgb(255,84,84)">UserJob</span><span style="color:rgb(0,0,0)">_25 jobqueue.cpp:2485 (Do</span><span style="font-weight:bold;color:rgb(255,84,84)">UserJob</span><span style="color:rgb(0,0,0)">Thread) JobQueue: Finished sendTVtoNAS for "Mission: Impossible Rogu</span><br>e Nation" recorded from channel 15009 at 2023-06-06T00:00:00Z<br>
<br></span></div><div><font face="arial, sans-serif">The parameters in setup are:</font></div><div><font face="monospace"> /usr/local/bin/TVShowToNAS.sh "%CHANID%" "%STARTTIMEUTC%" "%TITLE%" "%SUBTITLE%" "%SEASON%" "%EPISODE%" "%FILE%" "%DIR%"</font><font face="arial, sans-serif"><br></font></div><div><font face="monospace"><br></font></div><div><font face="monospace">The permissions of the .sh are:</font></div><div><span style="font-family:monospace"><span style="font-weight:bold;color:rgb(84,255,84)">mythtv@ubuntu-mythtv</span><span style="color:rgb(0,0,0)">:</span><span style="font-weight:bold;color:rgb(84,84,255)">~</span><span style="color:rgb(0,0,0)">$ ls -l /usr/local/bin/TVShowToNAS.sh </span><br>-rwxr-xr-x 1 root root 6195 Jun 6 17:47 <span style="font-weight:bold;color:rgb(84,255,84)">/usr/local/bin/TVShowToNAS.sh</span><br><span style="color:rgb(0,0,0)">
</span><br>So what did I miss??</span></div><div><span style="font-family:monospace"><br></span></div><div><span style="font-family:monospace">Jim A</span></div><div><span style="font-family:monospace"><br></span></div></div></blockquote><div><br></div><div>I think I know what the problem is, but I don't understand why.</div><div><br></div><div>I changed the script so that my working directory was in /tmp instead of /home/jim/Videos and the script ran when launched from mythfrontend.</div><div><br></div><div>I could see the problem if /home/jim/Videos wasn't 777 permissions, but there must be new restrictions since ATT SysV release 4 when I got started with Unix.</div><div><br></div><div>Jim A<br><br></div><div><br></div></div></div>