tgstation / tgstation-server

A production scale tool for DreamMaker server management
https://tgstation.github.io/tgstation-server/
GNU Affero General Public License v3.0
61 stars 78 forks source link

Default folder permissions on linux systems for generated instances #1246

Open bobbah opened 3 years ago

bobbah commented 3 years ago

Describe the bug Instances generated by TGS on Debian 10 appear to have rather permissive 755 permissions.

To Reproduce Steps to reproduce the behavior:

  1. Create instance on a linux TGS4 server
  2. Review permissions on created directories

Expected behavior I think it would be reasonable to have the generated directories and contents be 700, or 750, to prevent all users on the filesystem being able to read potentially sensitive logs and configuration values.

Logs n/a

Server State: (please complete the following information):

Cyberboss commented 3 years ago

I think this is something to do with dotnet because we just use Directory.CreateDirectory here https://github.com/tgstation/tgstation-server/blob/5b6c0c90fe6dba74b28a518e722544923039baec/src/Tgstation.Server.Host/IO/DefaultIOManager.cs#L159