[mythtv-users] File permissions
John P Poet
jppoet at gmail.com
Sun Oct 11 20:03:11 UTC 2020
On Sun, Oct 11, 2020 at 1:51 PM DaveD <mythtv at guiplot.com> wrote:
> On 10/11/20 11:34 AM, Greg Oliver wrote:
>
> On Sun, Oct 11, 2020 at 12:06 PM DaveD <mythtv at guiplot.com> wrote:
>
>> mythbackend runs as user mythtv. My normal user is a member of the
>> mythtv group and I have write permission on the storage directories, but
>> the recordings are created without group write permission. Any time I
>> need to work with a recording file (like fixing decoder errors (wish
>> that bug would get fixed some day, but I digress)) I need to chmod g+w
>> on the file first. Is there a way I can have the recordings always
>> created with group write permission?
>>
>> Dave D.
>
>
> You can always turn on the setgid bit on the directory as well.
>
> chmod g+s <storageGroupDirectory>
>
> 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
>
> setfacl -dm group:mythtv:rwx <storageGroupDirectory>
>
> 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...
>
> Dave D.
>
Are you using systemd to manage the mythbackend process? If so take a look
at:
https://www.freedesktop.org/software/systemd/man/systemd.exec.html#UMask=
John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20201011/fa92cd5b/attachment.htm>
More information about the mythtv-users
mailing list