[mythtv-users] File permissions files are when moved into MythTV directories

Thomas Boehm mythtv-users at lists.boehmi.net
Sat May 21 15:18:00 UTC 2016


On 21/05/16 15:48, Damian wrote:
> The videos in my storage directories are owned by the mythtv user and
> group. This seems to mean that I can finally delete content, once it's
> been watched, on my remote frontends. This is something that I've not
> been able to do for year, but fianlly cracked it with this latest MythTV
> install.
> 
> However, when I download content, and then move it into the mythtv
> storage group directories, the the user and group permissions are wrong,
> so I can't delete files from the frontend again.
> 
> I know that I can manually change the permissions of files after I've
> moved them, but that's a bit of a pain.
> 
> Is there any way to either automate this process, or set things up so
> that the extra step is not even needed?

There are several ways, depending on your setup. The easiest but maybe
not the best is to setup a cronjob for root and run it every hour or as
frequently as you like.

0 * * * * chown -R mythtv.mythtv /var/lib/mythtv

The other ways depend on how you get the content into the storage
directories. If it's from other PC's, then I would setup a samba share
for the mythtv directory. Add the following to /etc/samba/smb.conf

[mythtv]
        force user = mythtv
        force group = mythtv
        writeable = yes
        create mode = 644
        path = /var/lib/mythtv

and set a samba password for the user mythtv with

smbpasswd -a mythtv

If you download the content on your backend, have a dedicated user and
change his primary group to mythtv. Then the user mythtv should be able
to delete files as long as they group writeable.

And finally you could setup ACL for that directory. It should be
something like

setfacl -m -r m:mythtv:rw /var/lib/mythtv

Maybe someone here could confirm whether the syntax is correct or you
google it.


HTH
Thomas





More information about the mythtv-users mailing list