Empty r-sync'd directories.

  • Hello all,


    I have two installations of OMV. One is having all of the data r-synced to the other. On the source OMV, I can FTP in and see all directories and their contents.


    On the destination OMV (the one that all of the data is r-sync'd to, I can only see the shared directories and the directories inside of them, I cannot see any individual files.


    Is this a permissions thing? I granted access in the ACL as originally, I could only see the shares, I got a 550 error when I tried to open them, saying that the directory didn't exist. I reverted back but it is still working. Any help would be appreciated.


    Thanks,
    Nick.

    I ride bikes a long way.
    longbikejourney.com


    omv 6.9.2-1 (Shaitan) | 64 bit | Linux 6.1.0-0.deb11.11-amd64 | Intel(R) Xeon(R) CPU E3-1220 V2 @ 3.10GHz | Dell PowerEdge R210 8GB RAM

  • Hi there,


    Thanks for helping.


    I don't know anything about SSH but I have looked around and eventually logged in as root.


    From online advice to others, I have tried to find the shares via SSH and here is my terminal output:


    Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
    permitted by applicable law.
    Last login: Wed Feb 19 07:21:34 2020 from 192.168.1.147
    root@openmediavault1:~# blkid
    /dev/sda1: LABEL="backup1" UUID="b032f065-46bd-4838-b47f-ca27ed7d6d98" TYPE="ext4" PARTUUID="167d603e-acdc-4fb8-8783-ead9299d7fcb"
    /dev/sdc1: UUID="8d4c2b2b-bdd8-4dae-bad6-0197298aa91d" TYPE="ext4" PARTUUID="966b45a7-01"
    /dev/sdc5: UUID="427b6589-7b1f-4fc8-aca8-640d4a239c98" TYPE="swap" PARTUUID="966b45a7-05"
    /dev/sdb1: LABEL="backup2" UUID="c5749d55-a4c7-43f7-a4bd-a5cb8cd1cd39" TYPE="ext4" PARTUUID="01a4e68f-aa13-48c0-9147-2af32f21ce84"
    root@openmediavault1:~# cd /media/b032f065-46bd-4838-b47f-ca27ed7d6d98
    -bash: cd: /media/b032f065-46bd-4838-b47f-ca27ed7d6d98: No such file or directory
    root@openmediavault1:~# 


    I have read that the shared folders are stored in /media/<drive UUID>, and that the UUID can be found by running blkid


    So, you will see above that I have run blkid, changed directory with: cd /media/b032f065-46bd-4838-b47f-ca27ed7d6d98, and I get a "no such file or directory".


    For extra info, I have two drives on the installation, both 500GB and I have recently pooled them using the unionfilesystems plugin but there should still be shares on the 'backup1' disk as I have not moved most of them.


    Thanks,
    Nick.

    I ride bikes a long way.
    longbikejourney.com


    omv 6.9.2-1 (Shaitan) | 64 bit | Linux 6.1.0-0.deb11.11-amd64 | Intel(R) Xeon(R) CPU E3-1220 V2 @ 3.10GHz | Dell PowerEdge R210 8GB RAM

    • Offizieller Beitrag

    The shared folders should be found in the folder /sharedfolders if everything is OK. That is where you can see if you find the files.


    Also under /srv


    You might be helped by installing Midnight Commander, it is a text based file manager that may make it easier to navigate around and see what is there. Unfortunately it makes it very easy to delete stuff by mistake as well, so be careful.


    You install Midnight Commander with this command:


    sudo apt install mc


    And you run it with this command:


    mc


    And you run it with superman (root) powers with:


    sudo mc


    Then, if you know what you are doing, you can do anything to your poor OMV NAS. Anything at all... But you know the saying "with great power comes great responsibility"...


    By having a look-see earlier, I meant something like using mc to check that the rsync backup files are OK.


    However I suspect, I'm afraid, that even if you find the files you may have problems with figuring out if something is wrong wrong and what to do about it. There is no point in making backups if you don't know how to verify that they are there, and how to restore them. That you have used ACLs worry me. I doubt you have any reason messing with ACLs, but I could very easily be wrong.


    You can reset things by installing the plugin resetperms and using the then added reset permissions feature in the Shared Folders tab in the OMV GUI. Again, an extremely powerful command...

  • Hi there,


    Many thanks for the information. You are right, /sharedfolders is the correct directory.


    I have installed Midnight Commander, that's good, thank you for that! Looking at the shared files, their contents agree with what my FTP client says, so I have investigated further. Let me just give you a brief history:


    1. Short time ago, I had an old QNAP NAS fail on me and I ended up without my files (of which there were many).
    2. I managed to gain access to the files by plugging the NAS drive into my Windows PC and I was able to recover them by copying them to an external drive.
    3. I uploaded everything to a new install of OMV.
    4. To avoid ever losing them all again, I added a second OMV machine and r-sync'd everything to that, so that I effectively would have 2 copies of everything.


    So, to continue...


    After verifying the lack of data both with FTP and mc, I took a close look at the directories on the first OMV install (via FTP) to find that lots of them wouldn't open, giving this type of error:


    Command: CWD /music
    Response: 250 CWD command successful
    Command: CWD ACDC - The Very Best
    Response: 550 ACDC - The Very Best: No such file or directory
    Error: Failed to retrieve directory listing


    So, maybe this is why the directories on the other OMV install were empty, so I tried re-uploading the original files from the disk that I recovered them to, to the initial OMV install. I get this:


    Code
    Command:	PASV
    Response:	227 Entering Passive Mode (192,168,1,98,128,193).
    Command:	STOR /music/ACDC - The Very Best/18 - Rocker.mp3
    Response:	550 /music/ACDC - The Very Best/18 - Rocker.mp3: Permission denied
    Error:	Critical file transfer error after transferring 524,288 bytes in 1 second
    Status:	Retrieving directory listing of "/music"...
    Status:	Directory listing of "/music" successful

    I think this is down to permissions on the files in Windows (where I am running the FTP from), but I am not sure so will keep looking into it. I am having a hard time changing the permissions, the 'Read Only' checkbox has a solid square in it and if I clear it, it just turns up again when I reopen the properties box.


    There is no point in making backups if you don't know how to verify that they are there, and how to restore them. That you have used ACLs worry me. I doubt you have any reason messing with ACLs, but I could very easily be wrong.


    Well, I intended to verify and restore the backups through FTP. I didn't mess around with ACL too much as I wasn't sure what it was for. I changed one permission and then changed it back but I will not go near it again!


    Thanks,
    Nick.

    I ride bikes a long way.
    longbikejourney.com


    omv 6.9.2-1 (Shaitan) | 64 bit | Linux 6.1.0-0.deb11.11-amd64 | Intel(R) Xeon(R) CPU E3-1220 V2 @ 3.10GHz | Dell PowerEdge R210 8GB RAM

    Einmal editiert, zuletzt von Nick0 ()

  • OK, just to update - I have been dipping into this here and there and it is definitely a permissions problem because if I chmod the directories from 700 to 777, I have access. Who would have thought that it would take me this long to work that out??


    Anyway, I am assuming that the files are keeping the privileges from the 192.168.1.98 server (the source of the r-sync) and then the user on the 192.168.1.99 server (r-sync destination) doesn't have the rights somehow - I am still learning about this. BUT: if I login into the destination server as root, using SSH, and the chmod one of the directories from 700 to 777 with mc, then yay! i have access in Filezilla.


    So, I have edited the r-sync job on the 192.168.1.98 server by turning off: 'Set the destination permissions to be the same as the source permissions' and I am re-running the backup. Hopefully this will transfer the files with more suitable permissions for my 192.168.1.99 user. If not, maybe I will 777 all the directories on the 192.168.1.98 server and then turn on the 'Set the destination permissions to be the same as the source permissions' option again.


    I'm guessing but I'm learning.


    Thanks,
    Nick.

    I ride bikes a long way.
    longbikejourney.com


    omv 6.9.2-1 (Shaitan) | 64 bit | Linux 6.1.0-0.deb11.11-amd64 | Intel(R) Xeon(R) CPU E3-1220 V2 @ 3.10GHz | Dell PowerEdge R210 8GB RAM

    • Offizieller Beitrag

    After transferring files using ftp or ssh, use the plugin resetperms to reset the permissions and ownership of shared folders to the default:


    Changing owner to root:users ...
    Change directory permissions to 2775 ...
    Change file permissions to 664 ...
    Done...

  • After transferring files using ftp or ssh, use the plugin resetperms to reset the permissions and ownership of shared folders to the default:


    Changing owner to root:users ...
    Change directory permissions to 2775 ...
    Change file permissions to 664 ...
    Done...

    I know you already know this but THAT WORKS BEAUTIFULLY! Thanks alot, Adoby! :)

    I ride bikes a long way.
    longbikejourney.com


    omv 6.9.2-1 (Shaitan) | 64 bit | Linux 6.1.0-0.deb11.11-amd64 | Intel(R) Xeon(R) CPU E3-1220 V2 @ 3.10GHz | Dell PowerEdge R210 8GB RAM

Jetzt mitmachen!

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