OpenMediaVault-Plugin-Developers / openmediavault-compose

openmediavault plugin for docker-compose
14 stars 5 forks source link

loose file permissions on created files and folders in the compose plugins 'shared-folder' #9

Closed d1vzero closed 1 year ago

d1vzero commented 1 year ago

Hi, I wonder if there is a good reasons, why the user and file-access permissions on the created docker files and folders in the openmediavault-compose shared folder are very loose? Wouldn't it be better to narrow down the permissions as much as possible since the docker yaml files might also contain somehow important data that should not be accessible by every user (group is users) . Even "others" do have read-access to the files. However, changes made in the permissions will be overwritten during next deployment of a changed docker configuration (i.e. added container) .

Is it possible to tighten file permissions by editing /srv/salt/omv/deploy/compose/10compose.sls and /srv/salt/omv/deploy/compose/20dockerfile.sls or will this change break things?

Thank you

ryecoaaron commented 1 year ago

That is a good point. There is no reason to have open permissions. I will test a change that will use the permissions of the shared folder. Then the user can determine permissions when they are creating the shared folder.

ryecoaaron commented 1 year ago

6.9.1 in the repo. You can set the user, group and permissions of the directories/files on the Settings tab. It will default to root:root and 700 for dirs / 600 for files.

d1vzero commented 1 year ago

Perfect. Thank you!