AMC Permissions Issues

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
chimpchimp
Posts: 6
Joined: 23 Sep 2013, 18:22

AMC Permissions Issues

Post by chimpchimp »

Hello,

I'm hoping someone with a bit more experience with Linux permissions could help me out with an issue I'm having with the AMC script. Here is my set up:

Deluge running on a Ubuntu Server install
Files are copied to a Synology NAS that is mounted via NFS
NAS also runs Plex


The problem I am running into is that when files are copied via the AMC script, they are not given proper execution rights so while Plex can read them, it will not play them back. For example:

-rw-rw---- 1 108 116 3232322254 Nov 23 11:40 Kick-Ass 2 (2013).mkv

I can manually got in and adjust the permissions and suddenly Plex has no issue but I'm not sure what might be going on with the script to cause the initial permission to be set incorrectly.

Any help would be greatly appreciated.
User avatar
rednoah
The Source
Posts: 22991
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: AMC Permissions Issues

Post by rednoah »

Can't help you to figure out the original issue, but since you manually running chmod works, why not add --def exec and make the amc script chmod +something on the newly processed media files?
:idea: Please read the FAQ and How to Request Help.
chimpchimp
Posts: 6
Joined: 23 Sep 2013, 18:22

Re: AMC Permissions Issues

Post by chimpchimp »

Ah! I forgot you could execute from the script. I'll give that a try and see how it goes.
chimpchimp
Posts: 6
Joined: 23 Sep 2013, 18:22

Re: AMC Permissions Issues

Post by chimpchimp »

After some fiddling I was able to get the file permissions working by adding the following to the script:

Code: Select all

--def "exec=chmod 775 '{file}'"
However, it seems the parent directory that gets created is having similar issues, is there a variable like {file} for the other folders that get created by amc?
User avatar
rednoah
The Source
Posts: 22991
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: AMC Permissions Issues

Post by rednoah »

That would be {folder}. It's the same as the format expressions for naming.
:idea: Please read the FAQ and How to Request Help.
chimpchimp
Posts: 6
Joined: 23 Sep 2013, 18:22

Re: AMC Permissions Issues

Post by chimpchimp »

Got it working with:

Code: Select all

--def "exec=chmod 775 -R '{folder}'"
Thanks again for all your help!
guimello
Posts: 8
Joined: 08 Feb 2015, 12:33

Re: AMC Permissions Issues

Post by guimello »

I am having similar issues. Here is how I am calling the AMC script:

Code: Select all

bash filebot -script fn:amc --log-file ~/logs/amc.log --action move --conflict override --def "exec=chmod 775 -R '{folder}'" --def emby=192.168.0.128:51072559a5e04200a6260bf1106ef84f --def "movieFormat=/share/CACHEDEV1_DATA/Media/Movies/{n.upperInitial()} ({y}) {source}.{vf}.{vc}{'-'+group}/{fn}" --def unsorted=y clean=y -non-strict --def music=n artwork=y "/share/CACHEDEV1_DATA/Downloads/incoming/Movies"
But it's not creating the correct permissions in the new directory. Any ideas what the issue could be?
Post Reply