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.

chown/file permissions

Discussion in 'General Discussion' started by aingaranweb, Mar 19, 2004.

  1. aingaranweb

    aingaranweb Well-Known Member

    Joined:
    Mar 23, 2003
    Messages:
    65
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Toronto, Ontario
    I have a problem where a client is using a script that creates new files. These new files are created as "nobody" instead of "abbieca" the actual username.

    When he tries to delete the files / directories created by any script, it fails because he's logged in as "abbieca" and can not delete files owned by "nobody"

     
  2. nickn

    nickn Well-Known Member
    PartnerNOC

    Joined:
    Jun 15, 2003
    Messages:
    619
    Likes Received:
    1
    Trophy Points:
    18
    Is he creating the files with PHP?
     
  3. elleryjh

    elleryjh Well-Known Member

    Joined:
    Apr 12, 2003
    Messages:
    479
    Likes Received:
    0
    Trophy Points:
    16
    Use php/cgi to delete these files.


    ...or enable phpsuexec / suexec so that they're not owned by nobody when they're created.
     
  4. aingaranweb

    aingaranweb Well-Known Member

    Joined:
    Mar 23, 2003
    Messages:
    65
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Toronto, Ontario
    phpsuexec is already enabled.

    That particular php script doesn't have the delete function.

    Is there anything else I can try to do?
     
  5. elleryjh

    elleryjh Well-Known Member

    Joined:
    Apr 12, 2003
    Messages:
    479
    Likes Received:
    0
    Trophy Points:
    16
    <?php

    unlink("/home/username/path/to/file");

    ?>


    But if phpsuexec is enabled there's no reason for the file to be owned by nobody. Do you know why it is owned by nobody?

    If you have root access, just delete the files yourself.
     
  6. fishfreek

    fishfreek Well-Known Member

    Joined:
    Jan 2, 2004
    Messages:
    238
    Likes Received:
    0
    Trophy Points:
    16
    Quite possibly the files where written by a php script prior to phpsuexec being enabled.
     
  7. bamasbest

    bamasbest Well-Known Member

    Joined:
    Jan 10, 2004
    Messages:
    531
    Likes Received:
    0
    Trophy Points:
    16
    Very possible. Simple solution would be to recursively chown all files for that user and let them deal with which files they need or don't need?
     
Loading...

Share This Page