Finding files owned by a user?

jsteel

Well-Known Member
Jul 4, 2002
646
0
166
Atlanta, GA
Both cPanel and the 'quota' binary are reporting a user is over quota, however, executing 'du' in the user's home directory is returning a value about 100M below their quota. Is there anyway to scan for a list of all files owned by a particular user?

I had a problem like this once before and found that some files in another customer's account were owned by someone else. It was back in the CP5 days, so I figured that issued was resolved by now, but maybe not.

Thanks.

cPanel.net Support Ticket Number:
 

jsteel

Well-Known Member
Jul 4, 2002
646
0
166
Atlanta, GA
Cancel that request. Figured out the command. Unfortunately, everything checks out with what du is showing for the most part, so it appears the quotas are corrupt. I've already run fixquotas. Any ideas?

cPanel.net Support Ticket Number:
 

ciphervendor

Well-Known Member
Aug 26, 2002
1,052
0
166
Have you tried using quotacheck yet?

cPanel.net Support Ticket Number:
 

Tom Pyles

Well-Known Member
Apr 26, 2002
254
0
316
Check for log files and back-ups. We once did an upgrade and several users quota shot up....just over double of what it should have been. Turns out his back-ups were counting towards his quota (referring to server back-ups, not something he had stored in his own directory)

cPanel.net Support Ticket Number:
 

getnetworks

Member
Jun 24, 2003
13
0
151
We're having a similar problem and we've already scanned the whole system. The quotas are definitely off base (we're thinking it may be due to jailshell, possibly doubling their usage).

We haven't run quotacheck yet as we've seen other people cause problems with their servers if they don't restart with the filesystem mounted read-only for the check. Any input would be appreciated.

cPanel.net Support Ticket Number:
 

ciphervendor

Well-Known Member
Aug 26, 2002
1,052
0
166
jailed shell is not the culprit, I can say that from experience. You should execute the following command (using the space bar to forward through the results) to see all of the files owned by a certain user/group. If files are owned outside of the users home directory, then you have issues.
Code:
find / -user USERNAME -group USERNAME -type f -print | more
You should also check to see where you have quotas enabled. Open /etc/fstab to make sure say /backup doesn't have quotas enabled.

cPanel.net Support Ticket Number:
 

getnetworks

Member
Jun 24, 2003
13
0
151
Originally posted by ciphervendor
jailed shell is not the culprit, I can say that from experience. You should execute the following command (using the space bar to forward through the results) to see all of the files owned by a certain user/group. If files are owned outside of the users home directory, then you have issues.
Code:
find / -user USERNAME -group USERNAME -type f -print | more
You should also check to see where you have quotas enabled. Open /etc/fstab to make sure say /backup doesn't have quotas enabled.

cPanel.net Support Ticket Number:

1) Other than a few kilobytes (such as the Counters), the only other place files are found belonging to the user are under the .virtfs directory for jailshell.

2) Quotas are definitely enabled, and we don't see how the backup directory would have any impact since all backup tar.gz files are owned by root.

cPanel.net Support Ticket Number:
 

techark

Well-Known Member
May 22, 2002
280
0
316
Open /etc/passwd

find out the UID of the user

cd / to root/

Then type find -user UID

cPanel.net Support Ticket Number: