mobilizon: fix permissions on /var/lib/mobilizon and its folders
Image uploads were broken due to /var/lib/mobilizon/uploads being root-owned. The root cause is that systemd doesn't always process tmpfiles rules in the listed order. The "Z" rule is actually applied first, so it didn't have any effect on first run (when the directory doesn't exist). The other rules would then proceed to create the directory structure, but any parent directories that aren't explicitly listed would be root-owned. The fix is to explicitly list parent directories with the proper owner.
This commit is contained in:
@@ -398,7 +398,10 @@ in
|
||||
};
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
"d /var/lib/mobilizon 700 mobilizon mobilizon - -"
|
||||
"d /var/lib/mobilizon/sitemap 700 mobilizon mobilizon - -"
|
||||
"d /var/lib/mobilizon/uploads 700 mobilizon mobilizon - -"
|
||||
"d /var/lib/mobilizon/uploads/exports 700 mobilizon mobilizon - -"
|
||||
"d /var/lib/mobilizon/uploads/exports/csv 700 mobilizon mobilizon - -"
|
||||
"Z /var/lib/mobilizon 700 mobilizon mobilizon - -"
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user