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.

Finding files owned by a user?

Discussion in 'General Discussion' started by jsteel, Aug 19, 2003.

  1. jsteel

    jsteel Well-Known Member

    Joined:
    Jul 4, 2002
    Messages:
    646
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    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:
     
  2. jsteel

    jsteel Well-Known Member

    Joined:
    Jul 4, 2002
    Messages:
    646
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    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:
     
  3. ciphervendor

    ciphervendor Well-Known Member

    Joined:
    Aug 26, 2002
    Messages:
    1,052
    Likes Received:
    0
    Trophy Points:
    36
    Have you tried using quotacheck yet?

    cPanel.net Support Ticket Number:
     
  4. Tom Pyles

    Tom Pyles Well-Known Member

    Joined:
    Apr 26, 2002
    Messages:
    254
    Likes Received:
    0
    Trophy Points:
    16
    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:
     
  5. getnetworks

    getnetworks Member

    Joined:
    Jun 24, 2003
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    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:
     
  6. ciphervendor

    ciphervendor Well-Known Member

    Joined:
    Aug 26, 2002
    Messages:
    1,052
    Likes Received:
    0
    Trophy Points:
    36
    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:
     
  7. getnetworks

    getnetworks Member

    Joined:
    Jun 24, 2003
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1

    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:
     
  8. techark

    techark Well-Known Member

    Joined:
    May 22, 2002
    Messages:
    280
    Likes Received:
    0
    Trophy Points:
    16
    Open /etc/passwd

    find out the UID of the user

    cd / to root/

    Then type find -user UID

    cPanel.net Support Ticket Number:
     
Loading...

Share This Page