1 # This hook fixes permissions in common places
4 local dir
="${PKGDESTDIR}${1}"
5 # permission mask for matching the files
7 # permissions which will be set on matched files
10 find "$dir" -type f
-perm "/$permmask" -exec chmod -v "$perms" {} +
15 if [ -z "$nocheckperms" ]; then
16 # check that no files have permission write for other users
17 find "$PKGDESTDIR" -type f
-perm -0002 |
while read -r file; do
18 msg_error
"$pkgver: file ${file#$PKGDESTDIR} has write permission for other users\n"
22 if [ -z "$nofixperms" ]; then
23 change_file_perms
"/usr/share/man" 133 644
24 change_file_perms
"/etc/apparmor.d" 111 644
25 change_file_perms
"/usr/share/applications" 133 644
26 change_file_perms
"/usr/share/help" 133 644
27 change_file_perms
"/usr/share/icons" 133 644
28 change_file_perms
"/usr/share/locale" 133 644
29 change_file_perms
"/usr/share/metainfo" 133 644
30 change_file_perms
"/usr/share/appdata" 133 644
31 change_file_perms
"/usr/include" 133 644
32 change_file_perms
"/usr/share/bash-completion/completions" 133 644
33 change_file_perms
"/usr/share/fish/vendor_completions.d" 133 644
34 change_file_perms
"/usr/share/zsh/site-functions" 133 644