public_html directory owned by nobody

Bashy

Well-Known Member
Feb 20, 2011
67
3
58
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?
 
Last edited:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,202
363
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.
 

Bashy

Well-Known Member
Feb 20, 2011
67
3
58
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
 
Last edited:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,202
363
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.
 
  • Like
Reactions: Bashy

Bashy

Well-Known Member
Feb 20, 2011
67
3
58
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 :/
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,202
363
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.
 
  • Like
Reactions: SysSachin and Bashy

Bashy

Well-Known Member
Feb 20, 2011
67
3
58
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 :/
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,202
363
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.
 
  • Like
Reactions: Bashy

Bashy

Well-Known Member
Feb 20, 2011
67
3
58
Thanks, problem there is i have man, many files in public_html and many folders and files there after :/
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,202
363
Thanks, problem there is i have man, many files in public_html and many folders and files there after :/
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.
 
  • Like
Reactions: Bashy