Hot answers tagged

9

I am going to give this a shot. From a filesystem point of view: FAT32: Maximum number of files: 268,173,300 Maximum number of files per directory: 216 - 1 (65,535) Maximum file size: 2 GiB - 1 without LFS, 4 GiB - 1 with NTFS: Maximum number of files: 232 - 1 (4,294,967,295) ...


3

How you do this would depend on how these files are named. You could, for instance, divide these HTML files into subdirectories according to their first letter (assuming a fairly even/normal distribution). For example: /docs-a aardvark.html apple.html /docs-b banana.html bee.html : /docs-z zebra.html Then, given a request for /docs/...


3

You may be misunderstanding the concept, here. Files on S3 cannot be modified, but they can be overwritten, and overwriting a file does not require deleting the old file, first. You simply upload a new file with the same name. The old file does not go away unless and until the new upload is complete and successful. A failed or partial overwrite of an ...


3

Apache and Lighthttpd both have a directory listing mod that you need to enable, often by default these are disabled for security reasons. You can enable indexing by doing the following: Lighthttp To enable directory listings globally: dir-listing.activate = "enable" If you need it only for a directory, use conditionals: $HTTP["url"] =~ "^/download($|/)"...


2

Ok, so I have succeeded by making this little php script: <?php exec('wget http://sourcesite.com/backup.zip'); I mean, it's still transferring, so I'm not sure if there's some size limit but we'll see.


2

Is this file supposed to be a new legal file required to comply with world law where its contents describe the rules for my website usage, or does it belong to a special content management system? License.txt is simply a generic name for any license file. There is no web "standard" or convention for "license.txt" files like there is for, say, robots.txt or ...


2

How and where you store your files on a server has no relevance to SEO.


2

Yes. Just don't use default index files for the server. In a typical apache server setup, the default files are normally index.html and index.htm and maybe index.php depending on how the server is setup. Better yet, don't create a file that begins with "index.". Then when someone accesses your domain they will see a file and folder listing and the page ...


2

That is pretty much what people - including me - do. Take a descriptive name but eventually there will be a conflict since many times people have photos of the subject in slightly different poses. One way to go further is to make the name more descriptive some metadata to it such as the time or the photographer's name like: cat_eating_mouse_by_joe.jpg or ...


2

The sitemap is there, in part, to help Google find pages it might not otherwise locate, such as orphaned pages (pages with no links pointing to them). However, the main method Google uses to find pages is crawling - that's following links on pages. The links may be on your own website, or they could be links from other websites. If the indexed page is not in ...


2

Must /.well-known/ also be placed in the root directory? The /.well-known/ prefix is a defined standard (RFC8615), to which specific URI suffixes can be officially registered. So yes, it would need to reside in the root directory. More info: https://serverfault.com/questions/795467/for-what-is-the-well-known-folder Others I can think of, off hand... humans....


1

I think it may be difficult to get an exhaustive list of all possible files which need to live at the root. For one thing, different content management systems may place various files at the root, while others may place those elsewhere, so it depends on what platform you're using. Generally, your index.html file will be found at the root, but keep in mind ...


1

If all of the sites are similar in nature you could try a multisite install instead if not if maybe a different host or even upgrade from using a shared host to a vps gives you much more control and less limitation but the technical requirements are greater.


1

Unfortunately you have likely hit an inode limit https://au.godaddy.com/help/resource-limits-12001. Godaddy are pretty inflexible with this and lost me as a customer over it many years ago. If you go into cpanel and then the disk usage item, it will show you what directory sizes are, you can drill down to each directory and see the total file sizes being ...


1

There is no need to have your website hosted on Amazon. You can use S3 to store your audio files and then use the public links such as https://s3.amazonaws.com/bucketname/audiofilename inside your website to point to those static files. Check how to upload files to Amazon S3 (official guide) and how to generate public links.


1

This is partially subjective and especially because your question lacks too many points of context like: which applications are using these certificates, which OS (based on your mention of 644 it seems you speak about Unix systems - in which case saying rw-r--r-- seems far more readable to me - but there are other OS out there), which level of security, etc. ...


1

Your Contact Form 7 is using accept=".pdf" on the file input HTML. This instructs browsers that know how, to only show files which have a file name matching the pattern. Ideally your contact form would also specify the PDF mime type which would give slighty wider browser support, especially on mobile: accept=".pdf,application/pdf". However, even that ...


1

You can follow Google Image Publishing Guideline First. https://support.google.com/webmasters/answer/114016?hl=en&vid=0-1401327443069-1512401881759 You can make them unique by using a dash (-) instead of underscore (_) "cat-eating-mouse2.jpg" and "cat-eating-mouse3.jpg" that good from SEO perspective. Keep in mind what would be useful for someone who ...


1

It's not the specific compressor you need to know here. It's actually the amount of compression that is key. Uploading images without compression will provide original quality images at a price of a larger download. If you compress them just enough, then you'll get excellent quality images since people don't scan most images they see on the internet one ...


1

I've tried to have directories with tens of thousands of files on ext3 and ext4 Linux. It eventually gets to the point where listing those files is prohibitively expensive. It can take a few seconds for ls to complete. I would try do design for a max of 10,000 files per directory. One way of doing so is to use the first couple characters of the file ...


1

I basically agree with Simon Hayters statement that if they gained shell access - unless they had limited shell access by injection into say a php application that was using shell_exec - I personally would start thinking about restoring the system from trusted sources. But then the question becomes - if you don't learn how they got in that time - how can ...


1

If they are able to login via your SHELL then its pretty much game over and as mentioned by @w3d Apache log files are least of your worries. Apache writes to log files directly, no one can view those logs unless they are stored within the hosting path. If security is a major concern then you should confirm that you use the following practices: Your SSH ...


1

To write a custom listing, you need to write a script, but PHP is not the only scripting language, and is not one of the more secure scripting languages. However, no matter what scripting language you choose, if you are not careful to write a secure script, then the script will be insecure (regardless of the language). If you merely want a textual list of ...


1

Have you checked if the folder has permissions to IIS user? Try testing with giving all permissions to everyone on the folder and check if files are accessible by your application. Then start restricting the permissions.


1

755 for folders and 644 for php and other files.


1

I'd go in reverse order. Make file submission happen last then use crontab to delete garbage data at frequent intervals. If the data being submitted is small enough, then use PHP sessions or cookies to store the basic information then when the files are submitted, then store the basic info from the cookies or sessions to the database and then you won't ...


1

Unfortunately there is no way to prevent a file from being download twice in parallel. The HTTP protocol is stateless and as such each and every request is considered its own request for the file and the web server does not track file requests referenced against other requests for the same file. If this becomes a substantial issue then the only way to ...


1

If you're using Apache webserver you might use: # Turn on redirection module in case not already on RewriteEngine On # If requested file doesn't exist RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f # and the requested file is /scripts/script.php RewriteCond %{REQUEST_FILENAME} ="/scripts/script.php" # then use the script made available to all users ...


1

I agree with Stephen Ostermiller's answer but I'd like to add an easy way to fix your issue. I'm assuming you're using linux. I bet there is a function you can call in python to get the current username of the running script. You need to know this (or at least the group the user is in), otherwise you'll be playing a guessing game with the server. Another ...


Only top voted, non community-wiki answers of a minimum length are eligible