Questions tagged [files]

37 questions
10
votes
2 answers

What is a recommended maximum number of files in a directory on your webserver?

I have directory that contains 400,000+ files. Potentially the directory could easily contain ~30,000,000 files. Is that a good idea or should I rather chop it up in smaller directories like…
Louisa
  • 203
  • 1
  • 2
  • 4
5
votes
1 answer

what does license.txt belong to exactly?

Every now and then my server logs report that an IP is trying to look for license.txt on two domains. the IP belongs to amazonaws according to a whois lookup. Is this file supposed to be a new legal file required to comply with world law where its…
Mike -- No longer here
  • 13,650
  • 5
  • 29
  • 63
5
votes
7 answers

What should the Unix file system permissions be for PHP files under Apache?

What is the best practice for permissions with PHP files? When should they be writable, or executable? What owner is best? I'm using an Apache server.
Kirk Strobeck
  • 141
  • 1
  • 1
  • 5
4
votes
3 answers

File limit on shared hosting - does the issue still apply?

I've heard that shared hosting often imposes a limit on files per directory, though obviously this would be different per host. Generally speaking, is number of files still an issue on modern hosts? I am creating a static-page generator meant to be…
Pipsqweek
  • 141
  • 2
3
votes
0 answers

What is the recommended method to analyse the structure of a HTML page/site?

Recently, I have had to analyse and upgrade a web application. I need to know the relationships and functions of each file including CSS and JS inside each page, as opposed to the whole website. Thus, I would like to draw a "file map" to visually…
3
votes
2 answers

Are there any files or folders (apart from robots.txt and favicon.ico) which MUST go in the root directory according to their official spec?

I know that Robots Exclusion Protocol (robots.txt) Other similar .txt protocols (including sellers.json) favicon.ico must be placed in the root directory (according to their official spec), like…
Rounin
  • 2,385
  • 2
  • 17
  • 35
3
votes
1 answer

When splitting a folder with tens of thousands of documents into several folders, how can I handle broken links?

I have over 30,000 html files stored in www.example.com/docs, and these files are linked to each other. When it comes to displaying the content of those files on my site, I use the following code: HTML Include using Java I learned today that my host…
jcmaad
  • 65
  • 7
3
votes
0 answers

Change default index.html page of a subdomain in directadmin

When I create a new subdomain in direct admin panel it gets a default placeholder page saying something between the lines "welcome, the page is under construction" or whatever. I've looked online how to change it but only found info about how to…
aMJay
  • 163
  • 4
3
votes
2 answers

How can I name an image so that a) it's still unique b) descriptive

It's a given that a better name for a picture is "cat_eating_mouse.jpg" than "Aou7aIw=2.jpg". On my website I'm going to have thousands of pictures. It's not a big of a problem to name them manually, but to come up with a unique name. Say, I have 2…
Rakori
  • 131
  • 1
2
votes
2 answers

How can I display the MD5 or SHA1 of files in a web server directory?

When you don't have an index.html, most web servers will show a list of files in the directory. Can I get preferably lighttpd (but Apache as a backup) to do show a file's MD5/SHA1 (along with standard file size, date) with no (or minimal) other…
plonk420
  • 23
  • 5
2
votes
2 answers

When and how do I remove temporary files on server left from abandoned forms?

I have a form on my site to submit posts, it features multiple file upload tool (Mini Ajax File Upload Form) which submits files to server as they are added (before actual post submission) and server then stores them in temp dir. Once article has…
olegst
  • 171
  • 1
  • 7
2
votes
0 answers

Are the advantages to uploading files in a form one at a time rather than all when the form is submitted?

I have a form in my application where user can drop some files (images, csv, or other file types.) My current flow is: User drops the file I read the File and show an preview User Submit the form I Upload the file to GCP (Google Cloud) and retrieve…
Crocsx
  • 121
  • 2
1
vote
2 answers

best apache log file permissions on cpanel server

In an effort to protect my site from bad bots including ridiculous hackers that can login to the server, I want to secure access_log and error_log as much as possible without breaking apache or cpanel. I do believe that whatever user apache is…
Mike -- No longer here
  • 13,650
  • 5
  • 29
  • 63
1
vote
1 answer

How to stop parallel downloads

In my server logs I noticed random sets of IP's originating from china that are downloading the same file of about 16MB every couple of hours, and every time the computer downloads it, it starts the download twice, one second apart from each…
Mike -- No longer here
  • 13,650
  • 5
  • 29
  • 63
1
vote
1 answer

Configure files to come from a central location unless that file has been customized for a specific site

I have an user A on a server, this users has a working set of scripts (html+js+css+everything else). I also have users B-[as much as I want]. I want those to use the exact same files, but if they have the file themselves, use that. Like a multi-user…
Martijn
  • 6,806
  • 19
  • 36
1
2 3