refactored nginx.conf

This commit is contained in:
Your Name
2025-09-02 15:22:15 -04:00
parent db3f078583
commit 4412317ddb
40 changed files with 5076 additions and 1343 deletions

View File

@@ -2489,6 +2489,14 @@ void handle_upload_request(void) {
size_t bytes_written = fwrite(file_data, 1, content_length, outfile);
fclose(outfile);
// Set file permissions to 644 (owner read/write, group/others read) - standard for web files
if (chmod(filepath, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH) != 0) {
fprintf(stderr, "WARNING: Failed to set file permissions for %s\r\n", filepath);
// Continue anyway - this is not a fatal error
} else {
fprintf(stderr, "DEBUG: File permissions set to 644 for %s\r\n", filepath);
}
free(file_data);
if (bytes_written != (size_t)content_length) {