Access a remote directory with a different name - Unix

This is a discussion on Access a remote directory with a different name - Unix ; 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 ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Access a remote directory with a different name

  1. 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

  2. Re: Access a remote directory with a different name

    Twiggy182 wrote:
    > 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

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

    --
    buffle

  3. Re: Access a remote directory with a different name

    Twiggy182 wrote:
    >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.


    Symlink is going to be your best option here.

    >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


    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.

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


    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 dagon@dagon.net

+ Reply to Thread