set uploaded files to read-only access mode

This commit is contained in:
Alexey Verkhovsky 2005-01-23 20:26:39 +00:00
parent 12722d1df3
commit 405e81d29d

View file

@ -17,6 +17,8 @@ class FileYard
else else
File.open(file_path(name), 'wb') { |f| f.write(io.read) } File.open(file_path(name), 'wb') { |f| f.write(io.read) }
end end
# just in case, estrict read access and prohibit write access to the uploaded file
FileUtils.chmod(0440, file_path(name))
end end
def files def files