Permission denied

  • Hi,


    I have OMV running at home serving my media all fine. I've setup another OMV at work that I want to use to backup.


    I initially tried Duplicati from my home PC but can only get working if I use root username/password - if I try a user i don't get permission to complete the backup. (read/write file permissions set for user OK - or selected 'yellow')


    I've added user to SSH and user groups but denied access when saving backup?


    Can anyone help?


    Thanks

  • You have to describe your problem a bit more:

    - How and what are you trying to backup?

    - Do you have problems reading on the local host or writing on the remote host?

    - What exect error message do you get?

    - added user where tried to log in where?

    If you got help in the forum and want to give something back to the project click here (omv) or here (scroll down) (plugins) and write up your solution for others.

  • The second OMV I setup at work is for two uses..


    Backup a couple of PC's using Duplicati

    Backup Home OMV folders


    Initially using Duplicati on a PC to backup some folders on a PC - works fine local and remote if I use root username/password bu tpermission denied if I use a username (added to SSH group)


    User added in Users on OMV webpage, added to ssh group and home directory enabled - Users [on /dev/sdb1, Users/]


    Error report in Duplicati shown below. Not sure how to access logs on OMV?


    Code
    {"ClassName":"Renci.SshNet.Common.SftpPermissionDeniedException","Message":"Permission denied","Data":null,"InnerException":null,"HelpURL":null,"StackTraceString":"   at CoCoL.AutomationExtensions.<RunTask>d__10`1.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Duplicati.Library.Main.Operation.BackupHandler.<FlushBackend>d__19.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Duplicati.Library.Main.Operation.BackupHandler.<RunAsync>d__20.MoveNext()","RemoteStackTraceString":null,"RemoteStackIndex":0,"ExceptionMethod":"8\nMoveNext\nCoCoL, Version=1.7.1.0, Culture=neutral, PublicKeyToken=0983de3c914beeaa\nCoCoL.AutomationExtensions+<RunTask>d__10`1\nVoid MoveNext()","HResult":-2146233088,"Source":"CoCoL","WatsonBuckets":null}
    • Offizieller Beitrag
  • Is it correct, that you only have duplicati on your windows pc and are using the ssh backend to store data?

    can you ssh -v user@omv from windows (use a cmd shell / terminal window)?

    If you got help in the forum and want to give something back to the project click here (omv) or here (scroll down) (plugins) and write up your solution for others.

  • Is it correct, that you only have duplicati on your windows pc and are using the ssh backend to store data?

    can you ssh -v user@omv from windows (use a cmd shell / terminal window)?

    Yes, so far....


    ssh from CMD seems OK?


  • So what you see is that the user is allowed to access the server with provided password -> ssh configuration is correct.

    Next question is where are you trying to store the files / repo on the server i.e. what target path do you define in duplicati?

    Check write permission by

    Code
    ssh user@omv 
    cd /path/you/define/in/duplicati
    ls -lah
    touch test.txt

    If you got help in the forum and want to give something back to the project click here (omv) or here (scroll down) (plugins) and write up your solution for others.

  • So what you see is that the user is allowed to access the server with provided password -> ssh configuration is correct.

    Next question is where are you trying to store the files / repo on the server i.e. what target path do you define in duplicati?

    Check write permission by

    Code
    ssh user@omv 
    cd /path/you/define/in/duplicati
    ls -lah
    touch test.txt

    I didn't define a path in Duplicati - this warns that will use logon folder - which is what I want...




    Ran the code above minus the cd /path and saved txt file OK!



    so guess it's a Duplicati setting somewhere!??


    Thing that I don't understand is if I logon with root user it works fine, if I logon as a another user (same as I used in the CMD above) it denies permissions!

  • This is because root is allowed to write to any place on the disk.

    I tried it and as normal user it failed unless i put some directory in the target. in my case it is /home/pi/duplicati


    Did not try as root.

    If you got help in the forum and want to give something back to the project click here (omv) or here (scroll down) (plugins) and write up your solution for others.

  • Duplicati is lying. It does not store in the home directory bt uses /


    Here is the prove (set up a job as root:

    Code
    root@multipi:/home/pi# find / -xdev -name "dupli*"
    /duplicati-i3c91836ca0ff44779cd5b1427f4be50e.dindex.zip
    /duplicati-b0ae8a4738bbb4003af711b2c569b39c6.dblock.zip
    /duplicati-20220629T143323Z.dlist.zip
    root@multipi:/home/pi# ls -lah /dup*
    -rw-r--r-- 1 root root 1.1K Jun 29 16:33 /duplicati-20220629T143323Z.dlist.zip
    -rw-r--r-- 1 root root  14M Jun 29 16:33 /duplicati-b0ae8a4738bbb4003af711b2c569b39c6.dblock.zip
    -rw-r--r-- 1 root root  11K Jun 29 16:33 /duplicati-i3c91836ca0ff44779cd5b1427f4be50e.dindex.zip
    root@multipi:/home/pi# cat /etc/passwd | grep root
    root:x:0:0:root:/root:/bin/bash

    If you got help in the forum and want to give something back to the project click here (omv) or here (scroll down) (plugins) and write up your solution for others.

  • find the home directory of your user


    cat /etc/passwd |grep <user>


    the second from last is the home directory. In your case it will most likely start with /srv/...


    Code
    pi@multipi:~ $ cat /etc/passwd |grep pi
    pi:x:1000:100:,,,:/home/pi:/bin/bash
    pi@multipi:~ $

    If you got help in the forum and want to give something back to the project click here (omv) or here (scroll down) (plugins) and write up your solution for others.

  • That returns the following one line?


    lozcs:x:1000:100::/srv/dev-disk-by-uuid-2519447f-99be-4e92-baa0-4c02279259ae/Users/lozcs:/bin/sh

  • this is the backup target

    /srv/dev-disk-by-uuid-2519447f-99be-4e92-baa0-4c02279259ae/Users/lozcs


    mind capitalization

    If you got help in the forum and want to give something back to the project click here (omv) or here (scroll down) (plugins) and write up your solution for others.

  • this is the backup target

    /srv/dev-disk-by-uuid-2519447f-99be-4e92-baa0-4c02279259ae/Users/lozcs


    mind capitalization

    That worked a treat - thank you very much!


    Now - next job is backing up my OMV data drive at home - I'll look at macom instructions when I get home later.

Jetzt mitmachen!

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