Results 1 to 8 of 8

Thread: symbolic links

  1. #1
    Junior Member
    Join Date
    May 2004
    Posts
    21

    Default symbolic links

    I'm trying to put a link to our main site images folder within our forums folder. I tried this:


    Code:
    cd /public_html/forums
    ln -s /public_html/images siteimages
    This creates a file called 'siteimages' in the forums folder, but not a linked folder like i expected. Isn't the 'www' a symbolic link to public_html? That's what i'm trying to do... how do i do that?

  2. #2
    Junior Member
    Join Date
    May 2004
    Posts
    21

    Default

    I solved it myself. This worked:

    Code:
    ln -s ../images siteimages
    Seems that the absolute path doesn't work... probably because it's not really absolute.

  3. #3
    Senior Member
    Join Date
    Mar 2004
    Location
    Australia
    Posts
    183

    Default

    I'm guessing that if you did absolute paths then you would have to go from the filesystem root, not just from the root of your home directory.

    eg.

    cd /home/username/public_html/forums
    ln -s /home/username/public_html/images siteimages

    or alternatively

    cd ~/public_html/forums
    ln -s ~/public_html/images siteimages

    The 2nd one should work too because ~ points to your home folder (/home/username/).

    James

  4. #4
    Junior Member
    Join Date
    Apr 2004
    Posts
    12

    Default

    Is it possible to create a symbolic link from one of my cpanel package accounts to another of my cpanel package accounts ?
    If so, what would i use ?:
    Code:
    ln -s /dis-####_accountA/public_html/path/to /dis-####_accountB/public_html/path/to/some_where_else
    and SSH into my main UserName=dis-#### Password=*** to do this ?

    I have a wiki installed at account A (domainA.com) and would like to link that /wiki/ dir to account B (domainB.com) to make file updating easy and safe.

    There will be wiki scripting which i will have to do, but thats not a big deal.

    If 'cross account' symbolic link's are not permitted, can we create symbolic links with-in a single package account and 'cross sub domain' them in that single account ?

    'Cpanel package accountA' has domainA, install the wiki there and then create acouple symbolic link's to different sub.domiains under 'Cpanel package accountA' ?

    Thanks for any guidance or help.


    [EDIT]
    I skipped right over James's post.

    Would it be:
    Code:
    ln -s /home/usernameA/public_html/wiki /home/usernameB/public_html/wiki
    SSH from my main dis-#### username/account ?
    _

  5. #5
    Administrator AndrewT's Avatar
    Join Date
    Mar 2004
    Location
    Tulsa, OK
    Posts
    3,634

    Default

    Symbolic links between separate accounts will not work as expected in some cases. I would highly recommend using these only within a single account.

  6. #6
    Junior Member
    Join Date
    Apr 2004
    Posts
    12

    Default

    Thank you for the response.
    Tried linking under the same account from subA.domain to subB.domain and it worked good for my needs. A (switch) check in the wikis main LocalSettings file to see what sub domain is calling - then have that call different files for the wikis settings per-sub.domain is working as expected.

    Quote Originally Posted by AndrewT View Post
    Symbolic links between separate accounts will not work as expected in some cases.
    Could you (or anyone) explain why or in what cases.

    For now the single account link is working fine, but down the line; if permitted, i might like to cross account link.

    _

  7. #7
    Administrator AndrewT's Avatar
    Join Date
    Mar 2004
    Location
    Tulsa, OK
    Posts
    3,634

    Default

    Accessing the symbolic links via SSH will not work due to the jailed shell environment. Using them across accounts can also require special (higher) permissions which may be less secure than normal. Overall I wouldn't recommend it. You can always add separate domains as addon domains in cPanel.

  8. #8
    Junior Member
    Join Date
    Apr 2004
    Posts
    12

    Default

    Ok, thanks for the explanation.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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