Skip to content

Commit

Permalink
fix: fixperms.sh: remove spurious and unneeded chowns
Browse files Browse the repository at this point in the history
Refs: IN-816
  • Loading branch information
M0Rf30 committed Dec 17, 2024
1 parent 204d195 commit 8ddc314
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions src/libexec/fixperms.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,6 @@ printMsg() {
fi
}

# NOT /opt/zextras/{store,backup,index}
if [ ${extended} = "yes" ]; then
chown -R ${zextras_user}:${zextras_group} /opt/zextras/a* /opt/zextras/[c-hj-ot-z]* /opt/zextras/s[a-su-z]* 2>/dev/null
fi

chown ${root_user}:${root_group} /opt
chmod 755 /opt
chown ${root_user}:${root_group} /opt/zextras
Expand All @@ -84,6 +79,10 @@ chmod 755 /opt/zextras/common
chown -R ${root_user}:${zextras_group} /opt/zextras/common/conf
chmod 775 /opt/zextras/common/conf

chown -R ${zextras_user}:${zextras_group} /opt/zextras/admin 2>/dev/null
chown -R ${zextras_user}:${zextras_group} /opt/zextras/data 2>/dev/null
chown -R ${zextras_user}:${zextras_group} /opt/zextras/zmstat 2>/dev/null

for i in master.cf master.cf.in bysender bysender.lmdb tag_as_foreign.re tag_as_foreign.re.in tag_as_originating.re tag_as_originating.re.in; do
if [ -f /opt/zextras/common/conf/${i} ]; then
chown -f ${zextras_user}:${zextras_group} /opt/zextras/common/conf/${i}
Expand Down Expand Up @@ -187,10 +186,6 @@ if [ -d /opt/zextras ]; then
chown -R ${root_user}:${root_group} /opt/zextras/lib
fi

if [ -d /opt/zextras/wiki ]; then
chown -R ${zextras_user}:${zextras_group} /opt/zextras/wiki
fi

if [ -d /opt/zextras/conf ]; then
printMsg "Fixing ownership and permissions on /opt/zextras/conf"
chown -R ${zextras_user}:${zextras_group} /opt/zextras/conf
Expand Down Expand Up @@ -267,11 +262,6 @@ if [ -d /opt/zextras ]; then
fi
fi

if [ -d /opt/zextras/docs ]; then
printMsg "Fixing permissions and ownership on /opt/zextras/docs"
chown carbonio-docs-editor: /opt/zextras/docs
fi

if [ -d /opt/zextras/documentation ]; then
chown -R ${zextras_user}:${zextras_group} /opt/zextras/documentation
find /opt/zextras/documentation -type d -exec chmod 755 {} \;
Expand Down

0 comments on commit 8ddc314

Please sign in to comment.