[solved] Symlinking directories

Discussion in 'General' started by Banana Lord., Sep 10, 2011.

  1. Banana Lord.

    Banana Lord. New Member

    I want to sync the contents of /home/banana/srcds/orangebox/garrysmod/cache/*.dua to /home/bananatree/html/redirect/cache/. I did symlink it, but it kept reporting a 404 file not found error - did I miss something?
    Last edited by a moderator: Sep 12, 2011
  2. NiteWave

    NiteWave Administrator

    maybe permission issue.
    check
    #ls -ald /home/banana/srcds/orangebox/garrysmod/cache
    #ls -ald /home/bananatree/html/redirect/cache
  3. Banana Lord.

    Banana Lord. New Member

    [​IMG]
  4. NiteWave

    NiteWave Administrator

    can you give an example how you did it?
  5. Banana Lord.

    Banana Lord. New Member

    ln -s /home/banana/srcds/orangebox/garrysmod/cache/*.dua /home/bananatree/html/sdb/redirect/cache/
  6. NiteWave

    NiteWave Administrator

    ok. how about the parent directories' permission?
    #ls -ald /home/
    #ls -ald /home/banana/
    #ls -ald /home/banana/srcds/
    #ls -ald /home/banana/srcds/orangebox/
    #ls -ald /home/banana/srcds/orangebox/garrysmod/
  7. Banana Lord.

    Banana Lord. New Member

    [​IMG]
  8. NiteWave

    NiteWave Administrator

    looks like permissions ok. what url return 404 error for example(you can omit the domain name)?
  9. Banana Lord.

    Banana Lord. New Member

    what do you mean? Do you want the full URL of where the file should be?
  10. NiteWave

    NiteWave Administrator

    full URL is ok, if you think ok to paste here.
    or just replace the domain name as domain.com etc.
  11. Banana Lord.

    Banana Lord. New Member

  12. NiteWave

    NiteWave Administrator

    maybe. the file's permission ?
    #ls -ald /home/bananatree/html/redirect/cache/6afa5cc7a1de5a0df435669c6fc2a09b.dua
    #ls -ald /home/banana/srcds/orangebox/garrysmod/cache/6afa5cc7a1de5a0df435669c6fc2a09b.dua
  13. Banana Lord.

    Banana Lord. New Member

    Woah wait, those are two different files. Now it's like it's not symlinking them, did I not symlink it correctly?
  14. NiteWave

    NiteWave Administrator

    maybe you can create a directory link only, not many file links
    instead of:
    Code:
    ln -s /home/banana/srcds/orangebox/garrysmod/cache/*.dua /home/bananatree/html/sdb/redirect/cache/
    just do:
    #rm -rf /home/bananatree/html/sdb/redirect/cache/
    #ln -s /home/banana/srcds/orangebox/garrysmod/cache/ /home/bananatree/html/sdb/redirect/cache/
  15. Banana Lord.

    Banana Lord. New Member

    Code:
    root@us:/home/banana/srcds/orangebox# ln -s /home/banana/srcds/orangebox/garrysmod/cache/* /home/bananatree/html/sdb/redirect/cache/
    root@us:/home/banana/srcds/orangebox# ls /home/bananatree/html/sdb/redirect/cache/       5e8b4e1f2c4da62fa2af9e962201d93f.dua  c231c1542ebf0f1dd9ece322be324cad.dua
    6afa5cc7a1de5a0df435669c6fc2a09b.dua
    
    http://bananatree.im/sdb/redirect/cache/6afa5cc7a1de5a0df435669c6fc2a09b.dua

    still a 404

    EDIT:

    Code:
    root@us:/home/banana/srcds/orangebox# ls -ald /home/bananatree/html/sdb/redirect/cache/6afa5cc7a1de5a0df435669c6fc2a09b.dua
    lrwxrwxrwx 1 root root 81 Sep 11 22:58 /home/bananatree/html/sdb/redirect/cache/6afa5cc7a1de5a0df435669c6fc2a09b.dua -> /home/banana/srcds/orangebox/garrysmod/cache/6afa5cc7a1de5a0df435669c6fc2a09b.dua
    
    Last edited: Sep 12, 2011
  16. NiteWave

    NiteWave Administrator

    #ls -ald /home/banana/srcds/orangebox/garrysmod/cache/6afa5cc7a1de5a0df435669c6fc2a09b.dua
    ?
  17. Banana Lord.

    Banana Lord. New Member

    Code:
    root@us:/home/banana/srcds/orangebox# ls -ald /home/banana/srcds/orangebox/garrysmod/cache/6afa5cc7a1de5a0df435669c6fc2a09b.dua
    -rw-r--r-- 1 banana banana 222190 Sep 11 22:58 /home/banana/srcds/orangebox/garrysmod/cache/6afa5cc7a1de5a0df435669c6fc2a09b.dua
    
  18. NiteWave

    NiteWave Administrator

  19. Banana Lord.

    Banana Lord. New Member

    that works

    so do the other 2 caches that i'm using on a heavy traffic gameserver, it's just the symlinked ones. should I sudo -u banana the symlink? will that make the owners match?
  20. NiteWave

    NiteWave Administrator

    please try it

Share This Page