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.

Quota doesn't reflect all files

Discussion in 'General Discussion' started by fuzzymonkey, Oct 17, 2005.

  1. fuzzymonkey

    fuzzymonkey Well-Known Member

    Joined:
    Jun 11, 2004
    Messages:
    61
    Likes Received:
    0
    Trophy Points:
    6
    I'm having another php problem... At least I'm assuming this has to do with my previous php problem (abridged: php running as nobody makes uploaded files owned by nobody, causing users to have unlimited quota if they upload the files with a php program).

    Is there a tool that will chown all the right files in a user's home directory to that user?
     
  2. aby

    aby Well-Known Member

    Joined:
    May 31, 2005
    Messages:
    638
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    Try this script

    /scripts/enablefileprotect

    Also you can disable the upload option using php ....
     
  3. fuzzymonkey

    fuzzymonkey Well-Known Member

    Joined:
    Jun 11, 2004
    Messages:
    61
    Likes Received:
    0
    Trophy Points:
    6
    Thanks for your reply. I ran the script, but I think it only fixes permissions, not ownership. There are still tons of files owned by "nobody." I guess I'll have to chown them all by hand.
     
  4. fuzzymonkey

    fuzzymonkey Well-Known Member

    Joined:
    Jun 11, 2004
    Messages:
    61
    Likes Received:
    0
    Trophy Points:
    6
    For future reference, I cd'ed to /home as root, and ran the following bash command:
    Code:
    for f in * ; do chown $f:$f /home/$f/public_html/* -R ; done
     
  5. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    They won't have the correct ownerships with that, I'd suggest you use:

    /scripts/chownpublichtmls
     
  6. verdon

    verdon Well-Known Member

    Joined:
    Nov 1, 2003
    Messages:
    836
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Northern Ontario, Canada
    cPanel Access Level:
    Root Administrator
    Hey, that's cool!

    I imagine that would that be useful for easing the transition if switching to phpsuexec too?

    regards,
     
Loading...

Share This Page