Commit 2272ba4efa7befb8f3aee07ef6adcc771989ac7e
1 parent
673ee9d9
Exists in
master
and in
90 other branches
Fix permission errors on colab-admin import_emails
Signed-of-by: Matheus Fernandes <matheus.souza.fernandes@gmail.com>
Showing
2 changed files
with
17 additions
and
0 deletions
Show diff stats
cookbooks/colab/recipes/default.rb
@@ -19,6 +19,12 @@ directory '/var/log/colab' do | @@ -19,6 +19,12 @@ directory '/var/log/colab' do | ||
19 | mode 0755 | 19 | mode 0755 |
20 | end | 20 | end |
21 | 21 | ||
22 | +directory '/var/lock/colab' do | ||
23 | + owner 'root' | ||
24 | + group 'colab' | ||
25 | + mode 0755 | ||
26 | +end | ||
27 | + | ||
22 | execute 'secret-key' do | 28 | execute 'secret-key' do |
23 | f = '/etc/colab/secret.key' | 29 | f = '/etc/colab/secret.key' |
24 | command "openssl rand -hex 32 -out #{f} && chown root:colab #{f} && chmod 0640 #{f}" | 30 | command "openssl rand -hex 32 -out #{f} && chown root:colab #{f} && chmod 0640 #{f}" |
@@ -54,6 +60,7 @@ template '/etc/colab/settings.d/02-logging.yaml' do | @@ -54,6 +60,7 @@ template '/etc/colab/settings.d/02-logging.yaml' do | ||
54 | notifies :restart, 'service[colab]' | 60 | notifies :restart, 'service[colab]' |
55 | end | 61 | end |
56 | 62 | ||
63 | + | ||
57 | directory '/var/lib/colab-assets/spb/' do | 64 | directory '/var/lib/colab-assets/spb/' do |
58 | owner 'root' | 65 | owner 'root' |
59 | group 'root' | 66 | group 'root' |
@@ -72,6 +79,11 @@ cookbook_file '/var/lib/colab-assets/spb/fav.ico' do | @@ -72,6 +79,11 @@ cookbook_file '/var/lib/colab-assets/spb/fav.ico' do | ||
72 | mode 0644 | 79 | mode 0644 |
73 | end | 80 | end |
74 | 81 | ||
82 | +# Add mailman group to colab user | ||
83 | +execute 'colab-mailman-group' do | ||
84 | + command "usermod -a -G mailman colab" | ||
85 | +end | ||
86 | + | ||
75 | execute 'colab-admin migrate' | 87 | execute 'colab-admin migrate' |
76 | execute 'colab-admin:collectstatic' do | 88 | execute 'colab-admin:collectstatic' do |
77 | command 'colab-admin collectstatic --noinput' | 89 | command 'colab-admin collectstatic --noinput' |
cookbooks/mailman/recipes/default.rb
@@ -54,6 +54,11 @@ file '/etc/postfix/postfix-to-mailman-centos.py' do | @@ -54,6 +54,11 @@ file '/etc/postfix/postfix-to-mailman-centos.py' do | ||
54 | action :delete | 54 | action :delete |
55 | end | 55 | end |
56 | 56 | ||
57 | +# Add mailman group to nginx user | ||
58 | +execute 'nginx-mailman-group' do | ||
59 | + command "usermod -a -G mailman nginx" | ||
60 | +end | ||
61 | + | ||
57 | cookbook_file '/usr/lib/mailman/bin/postfix-to-mailman.py' do | 62 | cookbook_file '/usr/lib/mailman/bin/postfix-to-mailman.py' do |
58 | owner 'root' | 63 | owner 'root' |
59 | group 'root' | 64 | group 'root' |