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.

WHy does cPanel install files owned by non-associated UID?

Discussion in 'General Discussion' started by wizzy420, Jan 26, 2008.

  1. wizzy420

    wizzy420 Well-Known Member

    Joined:
    Nov 13, 2007
    Messages:
    125
    Likes Received:
    2
    Trophy Points:
    18
    I was poking around /usr/local/cpanel and noticed bunches of files owned by UID 500, GID 500 when there is no user with this UID/GID

    Any reason this is done?
     
  2. wizzy420

    wizzy420 Well-Known Member

    Joined:
    Nov 13, 2007
    Messages:
    125
    Likes Received:
    2
    Trophy Points:
    18
    bump!

    wizzy
     
  3. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,461
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    Please provide example files/directories.
     
  4. wizzy420

    wizzy420 Well-Known Member

    Joined:
    Nov 13, 2007
    Messages:
    125
    Likes Received:
    2
    Trophy Points:
    18
    In /usr/local/cpanel, a subset:

    drwxr-xr-x 6 root root 4096 Jan 7 18:09 share
    drwxr-xr-x 9 root wheel 4096 Feb 1 03:19 src
    -rwxr-xr-x 1 500 500 65 Mar 23 2006 startstunnel
    -rwxr-xr-x 1 500 500 60 Mar 23 2006 startup
    drwxr-xr-x 5 root root 4096 Jan 7 18:09 sys_cpanel
    -rwxr-xr-x 1 root root 104 Jan 26 06:05 tailwatch
    -rwxr-xr-x 1 500 500 134 Mar 23 2006 uninstall
    drwxr-xr-x 3 root root 4096 Jan 7 18:18 var
    -rw-r--r-- 1 root root 21 Jan 26 06:05 version
    drwxr-xr-x 3 root root 4096 Jan 7 18:09 vsrvmgr
    -rwx------ 1 root root 2558032 Jan 26 06:05 vsrvmgrd
    -rwx------ 1 root root 5399128 Jan 26 06:05 vsrvmgrqd
    -rwxr-xr-x 1 500 500 465 Mar 23 2006 vstartup
    drwxr-xr-x 10 root root 4096 Jan 26 06:07 whostmgr
     
  5. rpmws

    rpmws Well-Known Member

    Joined:
    Aug 14, 2001
    Messages:
    1,824
    Likes Received:
    5
    Trophy Points:
    38
    Location:
    back woods of NC, USA
    ken this is what I was asking about in the EDGE list :)
     
  6. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,461
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    Correct. I suspect it's a mirror issue as one of my test servers has this, while another does not. On the test server afflicted, it didn't arise until this past weekend.
     
  7. rpmws

    rpmws Well-Known Member

    Joined:
    Aug 14, 2001
    Messages:
    1,824
    Likes Received:
    5
    Trophy Points:
    38
    Location:
    back woods of NC, USA
    so seen it in CentOS5 and RedHatEL5
     
  8. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,461
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    Are you seeing this on new installs, or just existing servers? If you change the ownership, does it revert on a upcp?
     
  9. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,461
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    Looks like changing the ownership is not reverted after upcp, even after upcp --force.
     
  10. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,461
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    The ownership mixture occurs because some updates happen via single file download, while others through tarball extraction. The tarball extraction is a recent change and results in different UID/GID combinations occurring in the /usr/local/cpanel directory and children.

    We've adjusted the functionality that handles this part of the update process to ensure the ownership is properly retained.

    It is safe to chown the files in question to root:root
     
  11. wizzy420

    wizzy420 Well-Known Member

    Joined:
    Nov 13, 2007
    Messages:
    125
    Likes Received:
    2
    Trophy Points:
    18
    Just did some looking, it appears to be these directories:

    /home/.cpan/build/*
    /home/virtfs/USER/checkvirtfs
    /var/cpanel/perl/easy/Cpanel/Easy/*
    /root/installd/*
    /var/profiles/easy/apache/profile/custom/*
    /scripts/*

    So, you're saying that a:

    find / \( -type d -o -type f \) -user 500 -exec chown root:root {} \; -ls

    Should be a-ok?

    In case anyone is wondering, you can look on your server like this:

    find / -user 500 -ls | less
     
    #11 wizzy420, Feb 6, 2008
    Last edited: Feb 6, 2008
Loading...

Share This Page