NextPVR Forums

Full Version: Linux recording folder permissions
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi,

I, and I assume others, would like to be able to have full permissions to the recording folders and their files. Right now the owner of the folder and the recording are nextpvr and no write permissions are granted for either folder or file. Can you make the file permissions 777 for the folders and files so we can run comskip and store the edl in the folder or compress them to MP4 and replace the original? Or publish the password for user nextpvr? What are your thoughts on this?

JLM
For use with the deb installer I suggest you use the following permissions. This is from a script that I have in the next release of the installer.

Code:
#create the folder
mkdir -p $1

#allow access to video group
chgrp video  $1

#give video group write permission to folder
chmod +775 $1

# new file create with video group permission
chmod g+s  $1

# give write access to video group to new files in the folder
setfacl -d -m g::rwX $1

/home/userid/recordings will also have these settings

Additionally to make management of these folders easier you can add your user id to the video group.

Martin
Ok. I'm going to have to research some of those commands! I have never used setfacl before. Thanks

JLM
That one is important only if you want the video group members to have write access. Without it only the nextpvr user and root will have write access.

Martin
So yeah, that's the critical part for me. New files and folders need to have RW access for my login. I didn't know if that behavior was set by the application creating the file and folder or if it was a property of the folder they were created in. Or both/either. I guess it works just like windows. When it comes to permissions, linux is a whole 'nother animal so you can't assume.

JLM
So with this script if you add your user ID to the video group you should be ok without sudo.

Martin
So, sorry to resurrect an old thread, but I just switched my HTPC to Linux with the end of Windows 7 support, and I'm trying to get it to record to my secondary hard drive. It records just fine to /home/userid/recordings, but when I try to go to my /media/userid/Storage/Users/Public/Videos on my secondary drive, it gives me a permissions error every time.

I tried using the command line tools you outlined above, but still no dice. The scripts outlined in the other forum post about permissions didn't seem to help either, although I think you said they are just the same commands in script form? I also tried changing the uid in Disks for when the drive mounts, but while that allowed me to trash instead of just delete files directly (which was still a plus), it's still throwing the error when I try to record to my secondary drive.

Am I overlooking something simple? I'm not brand new to Linux, but I'm not really an expert either. Thanks for your patience.  Huh
Given that it is loaded in /media I am not sure of the point of the userid but I am guessing by the folder names that this is an ntfs drive you are trying to mount. Is it a share or physical drive?

Martin
Yeah, it's an NTFS drive. I'm on a desktop, so it's internal/local.
You need to create an fstab entry to automount it and assuming it gets mounted to a folder with specific goup rights make sure you add user nextpvr to that group. Consider using the gid for the video group.

Martin
Pages: 1 2