<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Oct 11, 2020 at 1:51 PM DaveD <<a href="mailto:mythtv@guiplot.com">mythtv@guiplot.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>
<div>On 10/11/20 11:34 AM, Greg Oliver
wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div dir="ltr">
<div style="font-family:monospace,monospace"><span style="font-family:Arial,Helvetica,sans-serif">On Sun, Oct
11, 2020 at 12:06 PM DaveD <<a href="mailto:mythtv@guiplot.com" target="_blank">mythtv@guiplot.com</a>>
wrote:</span><br>
</div>
</div>
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">mythbackend runs as user
mythtv. My normal user is a member of the <br>
mythtv group and I have write permission on the storage
directories, but <br>
the recordings are created without group write permission.
Any time I <br>
need to work with a recording file (like fixing decoder
errors (wish <br>
that bug would get fixed some day, but I digress)) I need to
chmod g+w <br>
on the file first. Is there a way I can have the recordings
always <br>
created with group write permission?<br>
<br>
Dave D.</blockquote>
<div><br>
</div>
<div style="font-family:monospace,monospace">You can always turn
on the setgid bit on the directory as well.</div>
<div style="font-family:monospace,monospace"><br>
</div>
<div style="font-family:monospace,monospace">chmod g+s
<storageGroupDirectory></div>
</div>
</div>
</blockquote>
<p>That assures new files are members of the same group as the
directory, which they are (mythtv). That does NOT give group
write permission to the file so I still have to chmod it (g+w)
before I can write to it. Another thing I just tried was</p>
<p>setfacl -dm group:mythtv:rwx <storageGroupDirectory></p>
<p>but even that didn't work. It's as if mythbackend is
specifically setting the mode. I've worked around it with a cron
job that runs every night as root just before my "fix decoder
errors" to chmod g+w on all files in the recordings directories,
but that seems like such a hack and new files aren't "fixed" until
the next cron job runs. I've spent WAY too much time on this. On
to other things...<br>
</p>
<p>Dave D.</p></div></blockquote><div><br></div><div>Are you using systemd to manage the mythbackend process? If so take a look at:</div><div> <a href="https://www.freedesktop.org/software/systemd/man/systemd.exec.html#UMask=">https://www.freedesktop.org/software/systemd/man/systemd.exec.html#UMask=</a></div><div><br></div><div>John<br></div></div></div>