Skip to content

Commit

Permalink
Fix mimetype private volume perms
Browse files Browse the repository at this point in the history
Using "mode" and "makedirs" together for a symlink led to a broken
config: Salt was creating the parent directories with mode 644, so they
weren't traversable, so the mimeapps.list file couldn't be read by
normal user. Fixed.
  • Loading branch information
Conor Schaefer committed Oct 19, 2020
1 parent 17cc36f commit e3ae0ae
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
16 changes: 12 additions & 4 deletions dom0/sd-mime-handling.sls
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@
# respective AppVMs.
##

sd-private-volume-mimeapps-config-dir:
file.directory:
- name: /home/user/.local/share/applications
- user: user
- group: user
- makedirs: True
- mode: "0755"

{% if grains['id'] in ["sd-viewer", "sd-app", "sd-devices-dvm"] %}

sd-private-volume-mimeapps-handling:
Expand All @@ -20,8 +28,8 @@ sd-private-volume-mimeapps-handling:
- target: /opt/sdw/mimeapps.list.{{ grains['id'] }}
- user: user
- group: user
- mode: "644"
- makedirs: True
- require:
- file: sd-private-volume-mimeapps-config-dir

{% else %}

Expand All @@ -31,7 +39,7 @@ sd-private-volume-mimeapps-handling:
- target: /opt/sdw/mimeapps.list.default
- user: user
- group: user
- mode: "644"
- makedirs: True
- require:
- file: sd-private-volume-mimeapps-config-dir

{% endif %}
2 changes: 2 additions & 0 deletions dom0/sd-workstation.top
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ base:
- sd-logging-setup
sd-viewer:
- sd-mime-handling
sd-devices:
- sd-mime-handling
sd-devices-dvm:
- sd-mime-handling
sd-proxy:
Expand Down

0 comments on commit e3ae0ae

Please sign in to comment.