Project

General

Profile

recording file/folder permissions

Added by Steven Wittwer 22 days ago

I am not a linux newbie, but also not (by any means) an expert.

I am trying to share the recording folder via smb (from Ubuntu 20.04) to my Windows PC that runs Emby. This all works fine (well, sorta).

I have in the recording profile (the default one) file and folder permissions to set to 0775, however, I can't delete from any other account, or via smb once TVH created the folders. I have recordings going into subfolders based on name. I would have assumed the setting in the recording default profile would have made it so any account could delete the folders/files.

Any ideas what I am doing wrong?

I can of course change the permissions manually, but that really doesn't work long term.


Replies (7)

RE: recording file/folder permissions - Added by Dave Pickles 21 days ago

You would need to set directory permissions to 0777 and file permissions to 0666 to allow any user to delete recordings.

However it's not really a good idea to remove recordings in this way. TVheadend maintains a record of the recordings which should exist (in ~hts/.hts/tvheadend/dvr/log/) and if it can't find the files these old entries will accumulate in the "removed recordings" section of the UI. Better to work with TVheadend than against it, for example by using the "Automatically delete played recordings" option.

RE: recording file/folder permissions - Added by Steven Wittwer 21 days ago

Thanks. I use Kodi as a front end, with Emby as the library manager. I know this is a bit convoluted, but I don't really like Emby as a recording engine (works fine, just not much flexibility). Currently I am using JRiver MC to record on Windows, and it works fine, but I really want to move to Linux for stability.

I also have a lot of automated processes using the Emby API that get triggered after watching an episode (but only on a select few episodes). And...to make matters more complicated, I record TV from 2 locations (one, my office, that uses HDHomerun Primes/Cable TV, and 1, my home, that uses OTA), the remote location transfers the episodes over OneDrive.

What are the realistic issues I would face by deleting the episodes outside of TVH? Is there any type of API call I could do that would 'clean' the database?

RE: recording file/folder permissions - Added by Steven Wittwer 17 days ago

So, I looked into this further, and I don't know that keeping those files listed in the 'removed recordings' is a bad thing, as I wouldn't want them to be re-recorded anyway. It's a small amount of disk space, so that isn't huge.

What I don't know is that if there ends up being thousands of entries (unlikely, but maybe after a few years), will that cause problems, or slow things down?

RE: recording file/folder permissions - Added by Flole Systems 17 days ago

It will cause problems when you run out of free inodes on some day, but I don't think that is likely even in the extremest usecase. You can also allocate more inodes then.

RE: recording file/folder permissions - Added by Steven Wittwer 17 days ago

Yeah, I don't see that becoming an issue. Besides, I'm pretty good at cleanup, and most of my Autorecs are for new episodes only, so I am sure I will go clean them up regularly.

I went ahead and pulled the trigger and installed on my production machine. TV recording is light right now, so if something goes wrong, I think I can get it fixed quickly.

Thanks a ton for the info everyone.

RE: recording file/folder permissions - Added by Steven Wittwer 16 days ago

last question on this topic (I hope). If I specify a different recording directory in the autorec rule, will it still apply the directory and file permissions defined in the recording profile?

I can try and see tomorrow, but hoping someone might be able to answer yet tonight.

RE: recording file/folder permissions - Added by Steven Wittwer 16 days ago

Just in case anyone has the same question, the permissions are created the same as what is in the recording profile.

I was a little confused though on how this works, so here it is.

If your profile says record to '/home/hts/recordedtv' then anything you add to the autorec directory field is in addition to the default location, so if you added 'Bull(2016)', then the actual record path would be '/home/hts/recordedtv/Bull(2016)'.

    (1-7/7)