3

My company website just take copies of the public html folder and keep zip files as backup in the same folder, I want to know if this is secure or not ? Because other people don't know the name for the zip file . Is there a way that a bad guy can brute force the zip-file name and download it ?

2

It depends on what the file contains. If every file in the public_html directory is a file that is intended for public dissemination, in their original, plain-text content -- then yes, by all means. But for any website running a CMS or similar, there are probably files that contain information you don't want distributed -- like configuration information for a database on a WordPress or Drupal website. It would be foolish to rely only on an unlikely file name to keep your data safe.

Some backup services will keep .zip files in a public directory, but use some sort of protection within .htaccess (deny from all) to prevent these from being accessed. This is better than nothing, but still insufficient, because a minor change to the server configuration (changing the AllowOverride config) would render the .htaccess file powerless to control access to the directory, and the .zip files would be accessible.

My recommendation: keep ZIP files out of the public webroot, keep the permissions 600 for these files, and add a .htaccess with a "deny from all" directive in the folder as failsafe.

Not the answer you're looking for? Browse other questions tagged or ask your own question.