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.

public_html directory owned by nobody

Discussion in 'General Discussion' started by Bashy, May 15, 2015.

  1. Bashy

    Bashy Well-Known Member

    Joined:
    Feb 20, 2011
    Messages:
    55
    Likes Received:
    1
    Trophy Points:
    8
    Hi, i have all folders set to the username except public_html


    drwxr-x--- 3 USERNAME USERNAME 4096 May 5 07:40 public_ftp/
    drwxr-x--- 152 USERNAME nobody 57344 May 15 13:12 public_html/
    and advice please, the reason i am asking is because cpanel is show the wrong disk space
    I did transfer the user from root to the reseller account, might have a bearing on this?
     
    #1 Bashy, May 15, 2015
    Last edited: May 15, 2015
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello,

    That's actually a normal group ownership value for the public_html directory. Have you tried using the "Disk Space Usage" option in cPanel to get a better idea of where the disk space usage is coming from?

    Thank you.
     
  3. Bashy

    Bashy Well-Known Member

    Joined:
    Feb 20, 2011
    Messages:
    55
    Likes Received:
    1
    Trophy Points:
    8
    Hi, i probably should have mentioned that this public_html is only showing 4mb in list accounts in whm and
    in the users cpanel on the left column BUT in the Disk usage in cpanel is showing correctly at 634.86 MB
     
    #3 Bashy, May 15, 2015
    Last edited: May 15, 2015
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello,

    Review the files via the command line using the "ls -al" command to determine if the files are owned by the account username. Also, use the "du -sh" command to see if the space used matches what's listed in cPanel.

    Thank you.
     
    Bashy likes this.
  5. Bashy

    Bashy Well-Known Member

    Joined:
    Feb 20, 2011
    Messages:
    55
    Likes Received:
    1
    Trophy Points:
    8
    Hi, thanks for the reply, they are all owned by root barring a couple that have been uploaded today
    space is shown as...

    drwxr-x--- 152 username nobody 57344 May 15 16:57 public_html/

    Thatsa wee bit less that the 600mb+ lol i take it its because root still thinks hes boss :/
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Right, you will need to ensure the files beneath the public_html directory are owned by the account username if you want them counted towards the account's disk space usage.

    Thank you.
     
    SysSachin and Bashy like this.
  7. Bashy

    Bashy Well-Known Member

    Joined:
    Feb 20, 2011
    Messages:
    55
    Likes Received:
    1
    Trophy Points:
    8
    Hi again and thanks, yeah i thought that and have been trying with this

    chown -R username /home/username/public_html

    to no avail, this is one of the files

    -rw-r--r-- 1 username root 61226 May 7 07:23 yesterdaygraph.jpg

    there is no : involved so i dont need the group, i have been hunting the net for the correct command :/
     
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    You should actually update the group ownership as well. EX:

    Code:
    chown user.user /home/username/public_html/file.name
    Note that if you use the recursive flag, it's going to incorrectly change the ownership of the public_html directory itself. Ensure group ownership of that directory is set to "nobody".

    Thank you.
     
    Bashy likes this.
  9. Bashy

    Bashy Well-Known Member

    Joined:
    Feb 20, 2011
    Messages:
    55
    Likes Received:
    1
    Trophy Points:
    8
    Thanks, problem there is i have man, many files in public_html and many folders and files there after :/
     
  10. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    You can use the recursive flag, but ensure you correct ownership of the public_html directory itself after running the recursive chown command. Note that it will make all files under the public_html directory owned by the account username.

    Thank you.
     
    Bashy likes this.
  11. Bashy

    Bashy Well-Known Member

    Joined:
    Feb 20, 2011
    Messages:
    55
    Likes Received:
    1
    Trophy Points:
    8
    Ah, oki doki, will have a go and let you know, thank you...
     
  12. Bashy

    Bashy Well-Known Member

    Joined:
    Feb 20, 2011
    Messages:
    55
    Likes Received:
    1
    Trophy Points:
    8
    Thats got it all sorted, thank you ever so much for you help Michael
     
  13. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page