Post Processing Permissions - 644?

Status
Not open for further replies.

np247

Dabbler
Joined
Jul 22, 2012
Messages
13
Good afternoon all,

I'm in the final stages of my (new) FreeNAS build and am left scratching my head.
I followed Josh's tutorial to setup a "download jail" which contains both. SAB and SickRage. SickRage runs as user "media" (816).

When media is automatically downloaded it is coming from a download directory with permissions of 777 (group/owner is "media"). When post processing happens, the file is moved to /mnt/tank/share/tv/<Show Name>/Season <##>. The "tv" directory has permissions set to "755" with the group/owner set to "media".

The issue is new files are showing up with permissions of 644. I really don't understand why...

This same issue is present for manual post processing as well, which makes me think it's a SickRage issue -- not a nzbToMedia script issue.

Help FreeNAS forum, you're my only hope.
 
Last edited:

Allan Wilmath

Explorer
Joined
Nov 26, 2015
Messages
99
The two possibilities that come to mind are inherited permissions, permissions that are the default from the parent directory. Why I like to use /media fora mount point. I think /mnt should be good though. And more likely one is the default permission mask when a user creates a file. This is a Unix/Linux security feature. And I will have to go google it.

Here is a good page: http://www.cyberciti.biz/tips/understanding-linux-unix-umask-value-usage.html

It also tells you the path to the file where the umask could go, should be the same when you reference it from the root of the jail file system instead of the root of the FreeNAS file system.

Good luck.
 

np247

Dabbler
Joined
Jul 22, 2012
Messages
13
The two possibilities that come to mind are inherited permissions, permissions that are the default from the parent directory. Why I like to use /media fora mount point. I think /mnt should be good though. And more likely one is the default permission mask when a user creates a file. This is a Unix/Linux security feature. And I will have to go google it.

Here is a good page: http://www.cyberciti.biz/tips/understanding-linux-unix-umask-value-usage.html

It also tells you the path to the file where the umask could go, should be the same when you reference it from the root of the jail file system instead of the root of the FreeNAS file system.

Good luck.

Sorry, I should have likely elaborated. The storage between the host and jail are as follows:

Host = /mnt/tank/share/tv
Jail = /share/tv

EDIT: I think you might be right. I think this is turning into a more *nix-basic-101. So the umask of 022 is being used then; 666-022 = 644; which is what I'm seeing. So...

How do I get file permissions to be 755? How would this have worked before this new build...
 
Last edited:

Allan Wilmath

Explorer
Joined
Nov 26, 2015
Messages
99
I just mention the inheritance because is has caused me frustration in the past. The second idea in my post fits your situation rather well since the default umask for a user happens to be 644.
 

np247

Dabbler
Joined
Jul 22, 2012
Messages
13
I just mention the inheritance because is has caused me frustration in the past. The second idea in my post fits your situation rather well since the default umask for a user happens to be 644.
Greatly appreciated. It's comforting to see that everything is functioning as it's supposed to given 022 -- 755 for directories, 644 for files. Just curious at this point how I could automatically create files as 755 at this point.

I have other hands in this system, but I thought for sure the old system had new files created as 755...
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
what do you expect/want them to be, 755 or 666?
There's no need for anything above 666, you are never going to execute your files so that bit it useless. only directories should be 7/5, as the execute bit means something different for directories then files.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
This is BSD... I don't need r+x for files do I...

Crap.
I don't think it matters, I 'chmod -R 777 /mnt/media' sometimes when I'm adjusting things for ease. shouldn't hurt anything, but it's probably more secure to keep the files non-executable.
 
Status
Not open for further replies.
Top