The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

php suEXEC and symlink

Discussion in 'General Discussion' started by Soheil, Sep 17, 2006.

  1. Soheil

    Soheil Active Member

    Joined:
    Jun 24, 2003
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    6
    I enabled php suEXEC on the server.
    One problem I have is I run a program which is installed in 3 different hosts and needs access to the images directory which is being shared from only one host.

    Hosts:
    <VirtualHost xx.xx.xx.xx>
    BytesLog domlogs/site1.com-bytes_log
    <IfModule mod_userdir.c>
    UserDir disabled
    UserDir enabled site1
    </IfModule>
    ServerName www.site1.com
    ServerAlias site1.com
    ServerAdmin webmaster@site1.com
    DocumentRoot /home/site1/public_html
    BytesLog domlogs/site1.com-bytes_log
    User user1
    Group user1
    CustomLog domlogs/site1.com combined
    ScriptAlias /cgi-bin/ /home/site1/public_html/cgi-bin/
    </VirtualHost>


    <VirtualHost xx.xx.xx.xx>
    BytesLog domlogs/site2.com-bytes_log
    <IfModule mod_userdir.c>
    UserDir disabled
    UserDir enabled site2
    </IfModule>
    ServerName www.site2.com
    ServerAlias site2.com
    ServerAdmin webmaster@site2.com
    DocumentRoot /home/site2/public_html
    BytesLog domlogs/site2.com-bytes_log
    User user2
    Group user2
    CustomLog domlogs/site2.com combined
    ScriptAlias /cgi-bin/ /home/site2/public_html/cgi-bin/
    </VirtualHost>


    <VirtualHost xx.xx.xx.xx>
    BytesLog domlogs/site3.com-bytes_log
    <IfModule mod_userdir.c>
    UserDir disabled
    UserDir enabled site3
    </IfModule>
    ServerName www.site3.com
    ServerAlias site3.com
    ServerAdmin webmaster@site3.com
    DocumentRoot /home/site3/public_html
    BytesLog domlogs/site3.com-bytes_log
    User user3
    Group user3
    CustomLog domlogs/site3.com combined
    ScriptAlias /cgi-bin/ /home/site3/public_html/cgi-bin/
    </VirtualHost>

    Folrder I want to share is in:
    /home/site2/public_html/images

    Before installing php suEXEC, all I did was create a symlink from host2 and host3 to point to images directory on host1

    Now, I have a permission problem and users can not see the images from host2 and host3

    Can someone please tell me how I can bypass this?

    Thanks so much
     
  2. rustelekom

    rustelekom Well-Known Member
    PartnerNOC

    Joined:
    Nov 13, 2003
    Messages:
    290
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    moscow
    you can try use

    chown -R nobody:nobody /home/site2/public_html/images

    and/or

    chmod -R 777 /home/site2/public_html/images
     
  3. Soheil

    Soheil Active Member

    Joined:
    Jun 24, 2003
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    6
    Hello and thanks for your reply.
    Unfortunately none of the methods works.

    Thanks anyways :)
     
  4. perfect-games

    perfect-games Well-Known Member

    Joined:
    Nov 11, 2004
    Messages:
    100
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    alberta
    i would take a look at any htaccess make sure they dont contain FLAGS or VALUES

    steve ;)
     
  5. rustelekom

    rustelekom Well-Known Member
    PartnerNOC

    Joined:
    Nov 13, 2003
    Messages:
    290
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    moscow
    BTW. Error messages from error_log and suexec_log will be helpful. It is hard give you any recommendation without knowledge what happen on server:)
     
Loading...

Share This Page