Sheduled tasks path errors

  • Hi,


    I'm New here and on OpenMediaVault.
    Just for the record, I created my own NAS out of an old laptop that was laying around in the closet. I tried Nass4Free, FreeNas and Debian installation to convert it as a NAS. I'm glad I found OMV as it is definitely the best of all.


    Anyways, so now that I have my NAS up and running with OMV on it, everything works fine until I tried to create a sheduled task that does a backup of the whole content of an FTP to my local HDD.
    I followed up a few tutorials but I ran up to several different errors.


    (Just so you know, I was able to succesfully dowload to whole FTP content into a Home Directory. The thing is that it seems that I can't have any rights on the files. So I can't do anything with them)


    So actually I have two tasks that are pretty close to work (I think) but still doesn't :



    • COMMAND LINE of the task : bash ~/../../sauvegardes/run.sh wich is calling this file wget -m -P /web/****/`date +"%d%m%Y"` ftp://****:****@ftp.******.net


      I get a permission denied after the successful login to the FTP. Seems like it cannot create any folders to store the files? (All the rights are good in the shared folder I believe)


    • COMMAND LINE of the second task : (this one is not calling any Shell files to run the script) wget -m -P /sauvegardes/web/*****/`date +"%d%m%Y"` ftp://******:******@ftp.******.net


      It apparently dowloads the whole content successfully but not inside the sauvegarde shared folder I created. :/


      I already tried putting /../../ before /sauve... but doesn't change anything.



      That would be awesome if you guys can help me out on this !








  • Well, even tho nobody on here helped I managed to find the solution. (Which would have been very easy to find for any regular user of this forum..) Anyways. I'm gonna post it here, it could help newbies like me in the future.


    So, to write the FTP dowloaded files to the desired shared folder, you need to specify the entire path. It should look like this /media/a84c3e96-9f3d-642c-8d5c-564783159647/SHARED FOLDER NAME


    To find this variable digits string (Which will be different for you) you can create another sheduled task with this code in it : awk '/\>\>\> /{flag=1;next}/\<\<\< /{flag=0}flag' /etc/fstab
    It will return you the whole /media/digits stuff.


    So in my case the final FTP dowloader code looked like this :
    wget -m -P /media/a84c3e96-9f3d-642c-8d5c-564783159647/sauvegardes/web/*****/`date +"%d%m%Y"` ftp://******:******@ftp.******.net


    Hope it helps somebody

    • Offizieller Beitrag

    Well, even tho nobody on here helped I managed to find the solution

    Didn't see this post until now...


    I couldn't tell what you were trying to do from your original post but I can now from your solution post.


    bash ~/../../sauvegardes/run.sh

    No matter which user this is run with, the sauvegardes folder would have to be in the root filesystem /. This could me regular users don't have permissions to access this folder since it had to be created with the root user.\


    To find this variable digits string (Which will be different for you) you can create another sheduled task with this code in it : awk '/\>\>\> /{flag=1;next}/\<\<\< /{flag=0}flag' /etc/fstab
    It will return you the whole /media/digits stuff.

    If you were on OMV 3.x, you can also look at the absolute path in the shared folder tab. To view it, read this post

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.2 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4 | scripts 7.0.1


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

Jetzt mitmachen!

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