refactored nginx.conf
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user