Skip to content
Snippets Groups Projects
Commit 3b4e7225 authored by Richard Fernando Heise Ferreira's avatar Richard Fernando Heise Ferreira
Browse files

Merge branch 'issue/64-portalmec-user' into 'develop'

Issue #64: FIX user of temp file

See merge request rfhf19/cleanning-portalmec!58
parents 824d8af8 4b4cbbda
No related branches found
No related tags found
1 merge request!58Issue #64: FIX user of temp file
Pipeline #38835 failed
......@@ -88,7 +88,7 @@ class V1::LearningObjects::ChunksController < ApplicationController
f.write File.read(file_chunk_path)
end
end
FileUtils.chown_R 'portalmec', 'portalmec', final_file_path
FileUtils.chown_R 'root', 'root', final_file_path
FileUtils.chmod 0644, final_file_path
# Cleanup chunk file directory and all chunk files
FileUtils.rm_rf(chunk_file_directory)
......
......@@ -58,7 +58,7 @@ class V1::LearningObjects::UploadsController < ApplicationController
path = File.join(dir, upload_params[:file].original_filename)
FileUtils.mv(upload_params[:file].tempfile.path, path, force: true)
FileUtils.chown_R 'portalmec', 'portalmec', path
FileUtils.chown_R 'root', 'root', path
FileUtils.chmod 0644, path
path
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment