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.

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:
    16
    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,577
    Likes Received:
    40
    Trophy Points:
    48
    Location:
    SLC
    cPanel Access Level:
    DataCenter Provider
    put a directive in /scripts/postwwwacct to chown it back to root
     
  3. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    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.
     
Loading...

Share This Page