Forum Moderators: phranque

Message Too Old, No Replies

Finding ghost files taking up space

         

maestroc

12:08 am on Jul 26, 2020 (gmt 0)

5+ Year Member



Hoping there is a simple answer to this. Not sure if this is the right board but I'll give it a shot anyway. I own my own small server running CentOS and cpanel/WHM.

I noticed today that in my cpanel for my main account it says there are roughly 8gigs of files marked as "Other Usage" which apparently means "‡The files outside of your home directory, the metadata that the system uses to store email in the mail directory, the email in Trash folders, or the files that you do not have permission to access."

How can I find those files so that I can see what is wasting all that space?

phranque

12:18 am on Jul 26, 2020 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



do you have telnet/ssh access or ftp access to your server?

btw welcome to WebmasterWorld! [webmasterworld.com]

tangor

11:26 pm on Jul 26, 2020 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Query: When you say own your own server is it one that is physically under your control? If yes, then you have access to those files (unless mis-configured) so take a look and see what is happening.

Aside: It took hackers near 15 years to break a password on my email server for one account, but once broke within three or four days had HAMMERED that account with spam out the wahzoo.

Regained control, changed passwords with REALLY HARDENED passwords and bulk deleted the noise.

Welcome to Webmasterworld ... and good luck!

maestroc

2:44 am on Jul 31, 2020 (gmt 0)

5+ Year Member



Yes, I control the server and have root access. Got hacked once many years ago so ever since it has been locked down tight with everything including 2FA for root and SSH logins. I am fairly sure that those files are just copies of stuff that I have moved around over the years and then forgot about when migrating from server to server or when moving accounts in or out of the system and doing a chown on them but forgetting to delete them when done. I tried doing a command line search for files owned by that account but that output list is like a needle in a haystack.

phranque

3:23 am on Jul 31, 2020 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



the following unix command will list files in reverse order of size:
ls -Sl


you can start with the big stuff...

larry29936

11:00 am on Aug 1, 2020 (gmt 0)

5+ Year Member Top Contributors Of The Month



I would start with the obvious......the log files.

tangor

2:00 pm on Aug 1, 2020 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I'd run database housekeeping first. Amazing how often that brings life back to a system. :)

maestroc

2:25 pm on Aug 1, 2020 (gmt 0)

5+ Year Member



I guess I should rephrase the question. I need a command to let me search for files owned by foo that are not in foo's home folder. I know how to search by user but don't know how to exclude certain folders from the search.

phranque

9:18 pm on Aug 1, 2020 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



don't know how to exclude certain folders from the search.

pipe the output of your ls command into a grep command.