Professional Web Applications Themes

Access a remote directory with a different name - Linux / Unix Administration

Hi all, I have a script which needs to access a file to an hardcoded directory (not my design) on a remote server. This directory is mounted under the directory /net/[remoteServerName]. This works fine for almost all the servers this script has to connect to. Except that for one of them, the file can not be move to the hardcoded directory. So I need a way to access the file but by using the hardcoded directory. Ok, let me repeat that with names:) I have 2 servers : localServer and remoteServer Hardcoded file to access : /hard/coded/dir/file.txt Real location of ...

  1. #1

    Default Access a remote directory with a different name

    Hi all,

    I have a script which needs to access a file to an hardcoded directory
    (not my design) on a remote server. This directory is mounted under
    the directory /net/[remoteServerName]. This works fine for almost all
    the servers this script has to connect to. Except that for one of
    them, the file can not be move to the hardcoded directory. So I need a
    way to access the file but by using the hardcoded directory.

    Ok, let me repeat that with names:)

    I have 2 servers : localServer and remoteServer
    Hardcoded file to access : /hard/coded/dir/file.txt
    Real location of the file : /other/location/file.txt
    Mouting point on "localServer" : /net

    So what I need is to be able to access the file from "localServer"
    through this directory:
    /net/remoteServer/hard/coded/dir/file.txt

    For the moment, the only way I can access it is:
    /net/remoteServer/other/location/file.txt


    It seems that symbolic link can't help me for that. I tried with
    mounting but I have access problem.

    Anyone has a solution?

    Thanks
    Max
    Twiggy182 Guest

  2. #2

    Default Re: Access a remote directory with a different name

    Twiggy182 wrote: 
    it seems to me that somewhere in apache .conf there's an option "follow
    symbolic links" . Maybe that could help ?

    --
    buffle
    clément Guest

  3. #3

    Default Re: Access a remote directory with a different name

    Twiggy182 <com> wrote: 

    Symlink is going to be your best option here.
     

    Yup,
    mkdir -p /hard/coded; ln -s /net/remoteServer/hard/coded/dir /hard/coded

    You now have real directory /hard/coded, and a symlink from the "dir" it
    contains to the "dir" on the server.
     

    I think symlinks can take care of it, but you can only create symlink
    filenames, not full paths. The solution is to fix the use of the hardcoded
    path, but failing that, make a real path up to the final dir, and symlink that
    to the correct location.
    --
    Mark Rafn net <http://www.dagon.net/>
    Mark Guest

Similar Threads

  1. How can I change to remote stream directory?
    By Trond Juan in forum Macromedia Flash Flashcom
    Replies: 2
    Last Post: November 8th, 01:52 PM
  2. How to get remote directory?
    By OMAFRA in forum Macromedia Exchange Dreamweaver Extensions
    Replies: 0
    Last Post: March 8th, 06:36 PM
  3. Replies: 1
    Last Post: July 4th, 12:23 AM
  4. Replies: 1
    Last Post: May 21st, 03:47 PM
  5. Remote Virtual Directory
    By Coder Coder in forum ASP.NET Security
    Replies: 0
    Last Post: November 10th, 09:41 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139