Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Problem with cpanel3-skel

Discussion in 'General Discussion' started by bsasninja, May 30, 2005.

  1. bsasninja

    bsasninja Well-Known Member

    Joined:
    Sep 2, 2004
    Messages:
    528
    Likes Received:
    0
    Trophy Points:
    166
    I have two files on root/cpane3-skel/public_html one is a index.htm file (a classic in construction page) and the other is a .htaccess file that has some mod rewrite functions.

    Everytime I create a domain this two files are copied to the folder of the user /home/user/public_html.

    My problem is that this two files have the user permission owner and group, and the user can delete the .htaccess without problem, so I want to change it to owner and group "root".

    This should be done automatically on /scripts/wwwacct, i found this line but it chowns the whole folder.

    safe_chown($user,$group,"$(mnt)/($user)/public_html");

    Is there a way to avoid chown to the .htaccess file?

    Thanks in advance.

    Hernán
     
  2. dalem

    dalem Well-Known Member
    PartnerNOC

    Joined:
    Oct 24, 2003
    Messages:
    2,664
    Likes Received:
    69
    Trophy Points:
    203
    Location:
    SLC
    cPanel Access Level:
    DataCenter Provider
    put a directive in /scripts/postwwwacct to chown it back to root
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    4
    Trophy Points:
    343
    Location:
    ON, Canada
    Or create a script to change it back to root, call it postwwwacct, and put it in the /scripts folder. The postwwwacct script is automatically run after wwwacct and you don't need to keep changing the wwwacct script after upgrades.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice