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.

Keeping a certain file off server

Discussion in 'General Discussion' started by linuxman, Jul 19, 2005.

  1. linuxman

    linuxman Well-Known Member

    Joined:
    Sep 20, 2003
    Messages:
    84
    Likes Received:
    0
    Trophy Points:
    6
    I have been seeing an issue with the zclass.php and oscommerce. Is there any way to keep a particular files from being installed on the server? So if someone tried to upload it, it would just be deleted? Thanks.
     
  2. brianoz

    brianoz Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,146
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    Melbourne, Australia
    cPanel Access Level:
    Root Administrator
    Put a command like:
    find /home -name zclass.php | xargs rm -f

    in your crontab to run 3-4 times a day. Depending on how many accounts you have, the find should complete in a few minutes.

    There's no way to remove it immediately it's created, although you might be able to add something to watch the ftp log and remove the file immediately it's created via upload.
     
Loading...

Share This Page