Cannot cd into directory after rsync pull from remote host

  • Hi,

    I recently configured rsync to pull freshly downloaded files from my main machine and put them into my plex media folder.

    This seemed to work fine, so far.

    I then noticed strange behavior in plex: It couldn't pull metadata from the files.


    When ssh-ing into the omv, I realized something is funny with the file permissions (I guess???).

    I cannot "cd" into that directory anymore.

    smb also stopped working for these folders


    This is my shell:


    Code
    root@OMV:/srv/3c9b9281-d16c-4650-87b2-bff4279086c3/Pool/Hörbücher# ls -lF
    insgesamt 40
    drwxrwxrwx 327 root users 16384 Feb 16 14:31 Hörbuch/
    drwxrwxrwx 358 root users 20480 Feb 16 13:35 Hörspiel/
    drwxrwxrwx   3 root users  4096 Aug 25 00:44 Podcast/
    root@OMV:/srv/3c9b9281-d16c-4650-87b2-bff4279086c3/Pool/Hörbücher# cd Hörbuch
    -bash: cd: Hörbuch: Datei oder Verzeichnis nicht gefunden


    [Sorry for German ;) It says: "File or directory does not exist"]


    I tried to give all the permissions possible (chmod 777 +x) and chown to all user:groups imaginable, but I just cannot enter that directory.


    Using Midnight Commander I can browse the directory normally [which is strange enough?] , so I can verify the files are actually there.


    So the questions are:

    1. How can I get back access to my files?

    2. Is this related to rsync?

    3. If so, what can I do to avoid this problem in the future?


    Many thanks for any suggestion!

  • Can you try to use TAB-completion for the directory name, so we can rule out it is just a matter of character encoding.

    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 directory exists since Feb 16. 14:41 and I do not know if you can distinguish ö from some other UTF-8 char which looks similair.


    can you try tree

    Code
    sudo apt-get install tree
    tree /srv/3c9b9281-d16c-4650-87b2-bff4279086c3/Pool/Hörbücher

    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 directory exists since Feb 16. 14:41

    Hmm, that's the date I last ran that rsync job. The directory (and most of its contents) lives happily on my server for at least 6 years? Confused....

    Zitat

    I do not know if you can distinguish ö from some other UTF-8 char which looks similair.

    Jupp, I'm german. It's the same as in the (working) parent directory (Hörbücher)


    BTW: That tree command works normally.

  • Show the output. Why doesn't tab completion work?

    If you get the tree, you are allowed to decend into Hörbuch, so it is not a permission problem.

    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.

  • Hi,

    sorry, for privacy reasons I don't want to put the output here completely,

    Also, it's about 4000 lines long.

    I cut the middle part.

    Code
    root@OMV:/srv/3c9b9281-d16c-4650-87b2-bff4279086c3/Pool/Hörbücher# tree /srv/3c9b9281-d16c-4650-87b2-bff4279086c3/Pool/Hörbücher/
    /srv/3c9b9281-d16c-4650-87b2-bff4279086c3/Pool/Hörbücher/
    ├── Hörbuch
    
    ...
    
    685 directories, 3911 files


    If you get the tree, you are allowed to decend into Hörbuch, so it is not a permission problem.

    That's what I'm confused about. I can use "mc" even as normal user and enter the directory.

    But not even "root" can cd into it?


    Another strange thing just occurred to me: For testing I wanted to create a new plex library from the "Hörbuch" directory.




    When I click on that "Hörbuch" folder, I get sent back to "/"?



    How can this be related to rsync? :/

    But when I created the sync job, that's when the trouble started. Note the "Podcast"-dir, which hasn't been changed recently by rsync, and is working perfectly normal.


    BTW: So many thanks for your help :)

  • It is not a permission problem, the eror message is.

    root@OMV:/srv/3c9b9281-d16c-4650-87b2-bff4279086c3/Pool/Hörbücher# cd Hörbuch-bash: cd: Hörbuch: Datei oder Verzeichnis nicht gefunden


    but tree can look into it with the same user, which can not find it.


    I still believe, it has something to do with the directory name. Either there is a non printable character or one of the characters is not what it look like it is. Why can't you use tab completion on the shell?

    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.

  • I still believe, it has something to do with the directory name.

    Dunno, the folder always was called like this, since OMV 2. Anyway, I will try to move the content to another folder using mc.


    Why can't you use tab completion on the shell?

    I don't know. I mean, normally I can, just not in this case. As if the folder did not exist.

  • What happens if you typ mv ./ and hit <TAB> (inside the directory Hörbücher)

    All the folders in srv/3c9b9281-d16c-4650-87b2-bff4279086c3/Pool/Hörbücher should be listed.


    You can try to rename the directory with mc. The name "Hörbuch" itself is not the problem.

    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.

  • Sorry, it took a while..

    The reason being mc didn't do a simple "move" operation, instead it copied al files physically, it seems.

    Took about 4 hours. :(

    But I was able to move the files outside that folder to a new folder "audiobooks", which is working fine for the moment.

    So the problem is kinda solved?

    Next I'll try to run rsync again and see what happens.

    I will report back.


    Zitat

    What happens if you typ mv ./ and hit <TAB>

    Nothing happened, except the "can't do that"-sound. Path will not be completed.


    Again, many thanks!

  • Yepp, it's definitively rsync, or my configuration of it.

    Directories were fine.

    I changed some files on my host drive and started a sync.

    After sync folders are funky again.


    rsyncd.conf (on the host side) is very minimalistic (for testing purposes)

  • Doesn't the rsync pull job just create a cron job which is executed? So rsnycd.con is only used for modules (aka server) in OMV.

    Can you post the config in the UI or the code of the rsync job?


    Did you check the source host, for the name of the directory?

    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.

  • Oh sh*t,

    I just realized you must have been right from the beginning - it must be something encoding related ... and rsync?


    I tried to setup rsync so it uses modules, but failed (another topic). That's why I configured rsyncd.conf in the first place.

    I wasn't aware that pulling with a simple "path" bypasses rsyncd.conf on the host.


    Also I just realized subfolders with "äüö" still don't work in the copy.

    So there must be a difference in encoding when rsync pulls from host rather when I copy over from host manually via smb.


    That's how i do the pull:



  • Many thanks, that link really helped me out.

    Any chance to configure rsync, so it does the conversion automatically? Otherwise rsync will always pull the files changed by convmv, making my effort quite pointless.

Jetzt mitmachen!

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