Jump to content

[Solved] why files & directories r creating automatically


Recommended Posts

Which folders?

 

This support request is being escalated to our root admin.

 

@djbob - similar to the problem posted in mod discussion called 'Stevie Hack', eh?

Link to comment
Share on other sites

Guest Geoff

Do you still have those files? If so, Please don't delete them!

 

Instead, post the absolute path to the files.

 

Thanks!

Link to comment
Share on other sites

Guest Geoff

Please post the absolute path to those directories, and we will take care of the rest.

 

Deleting them will make it harder for us to figure out the cause of this.

Link to comment
Share on other sites

We have had a couple of cases of this, but we have been unable to investigate the cause. Please post an absolute path so we can investigate and permanently delete them.

 

For example:

 

/home/jje/public_html/weirdfolder

Link to comment
Share on other sites

Guest Geoff

I've deleted that folder. It belonged to him, and contained an advertisement manager; didn't appear too threatening.

 

@earnsimply please post back if this happens again.

Link to comment
Share on other sites

I've deleted that folder. It belonged to him, and contained an advertisement manager; didn't appear too threatening.

 

@earnsimply please post back if this happens again.

 

May I know why files/directory are creating automatically, even deletion? In future, if files/directory are created automatically what shall I do without your help?

 

Link to comment
Share on other sites

Guest Geoff

There is a PHP script that you can run.

 

Please wait while I get it.

 

<?php

function deleteDir($dir) {
   // open the directory
   $dhandle = opendir($dir);
   if ($dhandle) {
      // loop through it
      while (false !== ($fname = readdir($dhandle))) {
         // if the element is a directory, and 
         // does not start with a '.' or '..'
         // we call deleteDir function recursively 
         // passing this element as a parameter
         if (is_dir( "{$dir}/{$fname}" )) {
            if (($fname != '.') && ($fname != '..')) {
               echo "<u>Deleting Files in the Directory</u>: {$dir}/{$fname} <br />";
               deleteDir("$dir/$fname");

            }
         // chmod all directories and files correctly
         // the element is a file, so we delete it
         } else {
            chmod("$dir", intval(0755, 8));
            chmod("{$dir}/{$fname}", intval(0644, 8));
            unlink("{$dir}/{$fname}");
            echo "Deleting File: {$dir}/{$fname} <br />";
         }
      }
      closedir($dhandle);
    }
   // now directory is empty, so we can use
   // the rmdir() function to delete it
   echo "<u>Deleting Directory</u>: {$dir} <br />";
   rmdir($dir);
}

Link to comment
Share on other sites

Possibilities:

1) We're talking about cgi-bin, which Apache re-creates in certain scenarios.

2) You're actually just failing to delete the folder, and your software can't detect this. You may have set the permissions badly...

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...