Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

index.html files automatically deleted after FTP upload

Hey guys,

New to infinityfree.

Currently trying to upload a number of wedding client photo galleries using WinSCP.

Between two galleries I have uploaded so far, one allows me to keep my index.html but the other keeps deleting after upload. The XML and PHP files aren't moving.

I am also currently uploading to the /htdocs folder as I have no way of making a var/www/html directory to allow my domain to be public.

What am I doing wrong here??

Comments

  • Hi
    htdocs folder is public dir and all files must go there
    for index.html I'm not sure "why"
    but maybe this helps https://infinityfree.net/support/why-are-my-files-deleted-after-uploading/

  • You should be able to upload the files to the htdocs directory. Yes, there isn't a /var/www/html, but that directory is only relevant if you have an Ubuntu or Debian server which only hosts one site.

  • Ok I think I see what's going on here.

    Two HTML files generated for ONE gallery: the one that works has a file size of 700kb. The other one has a file size of 977kb. The 977kb The other two I'm trying to upload has a file size of between 3-5MB and both get automatically deleted.

    HTML code/files capped at 700kb shouldn't be an issue.

  • The file size limit is 10 MB for all files. The only exception are .htaccess files (capped at 10 kB), so a 700 kB HTML file should be no issue.

    That still leaves two known reasons of why files may be automatically deleted:

    • You're trying to upload the file outside of a htdocs directory.
    • The file you're trying to upload is flagged as malware.

    If you're not sure which of the two reasons causes your files to be deleted, you can check it by creating a simple HTML file (only a few words, nothing else) and upload it to the same directory as you were uploading the gallery.

  • edited October 24

    Uploaded a basic 5-line script and uploaded without issues.

    The module I use to create my galleries outputs to an HTML file and uses the SAME SCRIPT so the only variable between the 700kb file and the 3-5MB file are where IMG SRC are sitting.

    Re-exporting the gallery seemed to take my index.html file down to 1.4MB.

    I'd like to know how to check if this is a malware-related issue.

  • @pkfoto said:
    Uploaded a basic 5-line script and uploaded without issues.

    The module I use to create my galleries outputs to an HTML file and uses the SAME SCRIPT so the only variable between the 700kb file and the 3-5MB file are where IMG SRC are sitting.

    Re-exporting the gallery seemed to take my index.html file down to 1.4MB.

    I'd like to know how to check if this is a malware-related issue.

    Sadly, there is no way to easily check for that. We cannot share the exact checks being done on the files because we don't want hackers to try and figure out a way to circumvent it.

    Does the re-exported gallery file get deleted as well?

  • @Admin said:

    Does the re-exported gallery file get deleted as well?

    Unfortunately yes.

    I don't get why an upload would stick for one html and but the other deleted when it generates the same code.

  • if you upload the file in htdocs then index.html files won't delete after uploading, i have tried this.
    hope this will help you!!

Sign In or Register to comment.