On Wed, Oct 19, 2011 at 6:34 PM, Lennart Poettering
On Wed, 19.10.11 18:28, Richard Shaw (hobbes1069(a)gmail.com) wrote:
> Well, as I had already mentioned I more or less relented, so I'm all
> for the a/v group method. My main concern is how to apply this. If
> someone has already been running mythbackend as root then all the
> recordings will be owned by root, in which case mythbackend will be
> unable to expire (delete) them.
> In order to fix this retroactively, I would have to do an sql query
> using the login credentials for mythbackend and pull the recording
> groups, then go to each recording group directory and chown all the
> recordings. That's a mess.
Where are these recordings stored? Don't they have a common root
directory? Wouldn't a chown in that directory suffice? (it might be a
bit unfriendly to chown them away btw, adding an ACL for your user might
be a nicer solution)
No, there's no common directory. The great thing about mythtv is it's
flexibility, the bad thing about mythtv is it's flexibility. :)
MythTV does not make any assumptions about the storage needs of the
end user. It could be as simple as a Tivo equivalent, like myself, to
someone storing stuff on a SAN, or multiple drivers/arrays/SAN's, etc.
The storage directories paths are stored in the mythtv mysql database.
You're right, an ACL approach may be better. But my sql-fu isn't
really up to the task. For this to work:
1. mysqld would have to be running.
2. I would have to source /etc/mythtv/mysql.txt to get the variables
(DBHostname, DBUserName, DBPassword, and DBName)
3. Call mysql from the commandline, query the DBName for the recording
4. setfacl -m u:mythtv:rw -R /path1 /path2 /path3 /path[n]...
And I'd have to do all this in a failsafe way from %pre without any