Filezilla Docker - Can't run command after transfer queue completes

  • I'm using the jlesage/filezilla docker and I have it setup through portainer and working fine for the most part. What I'd like to do now is for it to run a command once the transfer queue completes. If you right click in the white space where the transfer queue is located, there is an option for 'action after queue completion' and then 'run command'.


    Here is the command I'd like to run

    Code
    unrar e -r *.rar


    I tried putting that in as the command, and it didn't work. so i tried a bash script, and put in "/storage/unrar.sh" in as the command, where storage is a bind mount in the volumes section for the docker


    Bash
    #!/bin/bash
    unrar e -r *.rar


    I'm guessing its some sort of Docker permissions issue? If I run the command or script via shell when i'm logged in, it works fine. It doesn't seem to be working when the transfer queue completes.

    Could it be the console setting under "command and logging" in advanced container options?

  • Went into Portainer's log and found this no matter what i set for the console setting

    Code
    execvp(/storage/unrar.sh) failed with error 2!


    Also tried typing in unrar e -r *.rar into the box directly and also got the same error from execvp.

    Not sure if its relevant, but the logs for the dockers are off by 5 hours but portainer's event logs are accurate. I don't see an option for setting time for the dockers.

  • hotsauce

    Hat den Titel des Themas von „Filezilla - Can't run command after transfer queue completes“ zu „Filezilla Docker - Can't run command after transfer queue completes“ geändert.
  • Tried a few more things, and they all resulted in execvp failing with error 2 except for when in the filezilla box, I tried putting the following:


    Code
     touch hello.txt

    And then instead the logs showed:

    Code
    touch: hello.txt: Permission denied


    Here are a few variations of execvp errors from what I've tried

    Code
    execvp(/storage/unrar.sh) failed with error 2!,
    execvp(unrar,, e -r) failed with error 2!,
    execvp(unrar,, e -r) failed with error 2!,
    execvp(unrar, e -r *.rar) failed with error 2!,
    execvp(/storage/unrar) failed with error 2!,
    execvp(/storage/unrar.sh) failed with error 2!,
    execvp(/storage/unrar.sh) failed with error 2!,
    execvp(unrar) failed with error 2!
  • your issue could be related to security design restriction imposed on sharedfolders.

    Sharedfolders , probably used in your docker volume definition, are mounted (file system level) without execution permission.


    If that your case, there is a way around it.

    ("The mntent entry could be changed in /etc/openmediavault/config.xml ")

  • If that your case, there is a way around it.

    ("The mntent entry could be changed in /etc/openmediavault/config.xml ")

    Are you referring to noexec? I removed that already to fix transcoding on Plex. I also tried adding exec in addition to removing noexec, but that didn't change the execvp error. So currently I have that line without noexec and without exec.

  • I'm wondering if it may be a syntax issue
    or does the script need to be included in the Docker config somehow?
    Here's a man page for execvp: https://linux.die.net/man/3/execvp


    Another small update to my testing:
    "touch hello.txt" results in the execvp error

    touch "hello.txt" and touch hello.txt results in Permission Denied

  • hotsauce

    Hat das Label gelöst hinzugefügt.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!