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.

Alias for certain vhosts + min_uid

Discussion in 'General Discussion' started by AudunS, Nov 11, 2010.

  1. AudunS

    AudunS Member

    Joined:
    Nov 11, 2010
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Hello!

    We have about 5 users so far on our cPanel-server, and some of them are going to use a CMS we have written.

    I started of by adding a custom.conf-file to the /var/cpanel/userdata/username-directory, containing "alias /admin /path/to/cms". Then I used build_apache_conf, and the alias is ok.

    But when entering the admin-folder, I get the 500 Internal-error, and the Apache-log contains "SoftException in Application.cpp:357: UID of script foo is smaller than min_uid".

    Now this folder is owned by root:wheel, and is supposed to be used by several domains. I can see that the other folders with aliases are owned by root:wheel, and they work just fine.

    What will I have to do for this custom alias to work on multiple sites?
     
  2. vanessa

    vanessa Well-Known Member
    PartnerNOC

    Joined:
    Sep 26, 2006
    Messages:
    817
    Likes Received:
    22
    Trophy Points:
    18
    Location:
    Virginia Beach, VA
    cPanel Access Level:
    DataCenter Provider
    If you're using suPHP you can't have files owned by root in user directories, unless you lower the min id setting in suphp.conf

    Code:
    ; Minimum UID
    ;min_uid=100
    
    ; Minimum GID
    ;min_gid=100
    
    I'd recommend that instead of having the CMS files owned by root, create another user on the system and set the files to that user. This way you don't have to open a security hole by enabling root-owned php scripts.
     
  3. AudunS

    AudunS Member

    Joined:
    Nov 11, 2010
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    That worked like a charm, and is of course much much smarter. Thanks! :)
     
Loading...

Share This Page