Page 1 of 1

Folder Permission Fix

Posted: 23 Jan 2017, 20:42
by afinite
Hi folks, just need some simple help with permission setting in filebot cli.... my current script (snippet seen below) sets the permission of the files and subdirectories correctly, but does not set them for the newly created directory correctly.

Example:
- I grab a new TV show and no directory exists for this show at the moment
- Once completed, my filebot script gets triggered (note: this is just part of the script):

Code: Select all

filebot -script fn:amc --output "$CONFIG_OUTPUT" --action duplicate --conflict auto -non-strict --log-file /root/tmp/amc.log --def "exec=chmod 777 '{folder}/' ; chown root:admin '{folder}/'" unsorted=y
The

Code: Select all

"exec=chmod 777 '{folder}/' ; chown root:admin '{folder}/'"
in the script above sets the permission for the sub-directories and files correctly... just not the main directory...

So:

Code: Select all

New TV Show (permission incorrect)
 - Sub dir 1 (permission is correct - 777 & root:admin)
------ File.mkv (permission is correct - 777 & root:admin)
Please help me fix this :)

Re: Folder Permission Fix

Posted: 23 Jan 2017, 21:16
by rednoah
Just do a recursive chmod/chown on all your files.