symbolic links

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tspilman
    Junior Member
    • May 2004
    • 21

    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?
  • tspilman
    Junior Member
    • May 2004
    • 21

    #2
    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.

    Comment

    • james
      Senior Member
      • Mar 2004
      • 183

      #3
      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

      Comment

      • Misspell
        Junior Member
        • Apr 2004
        • 12

        #4
        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-####_account[B]A[/B]/public_html/path/to /dis-####_account[B]B[/B]/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/username[B]A[/B]/public_html/wiki /home/username[B]B[/B]/public_html/wiki
        SSH from my main dis-#### username/account ?
        _

        Comment

        • AndrewT
          Administrator
          • Mar 2004
          • 3653

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

          Comment

          • Misspell
            Junior Member
            • Apr 2004
            • 12

            #6
            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.

            Originally posted by AndrewT
            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.

            _

            Comment

            • AndrewT
              Administrator
              • Mar 2004
              • 3653

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

              Comment

              • Misspell
                Junior Member
                • Apr 2004
                • 12

                #8
                Ok, thanks for the explanation.

                Comment

                Working...