[Slackbuilds-users] Improvment in templates considering permissions

Tonus tonus1 at free.fr
Mon Aug 18 00:51:02 UTC 2025


Hi,

I encountered a problem with permissions on a package (spotted with
sbopkglint).
Some directories had the setgid set on 2 and were not changed with the
usual :

#+begin_src bash
find -L . \
 \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
  -o -perm 511 \) -exec chmod 755 {} + -o \
 \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
  -o -perm 440 -o -perm 400 \) -exec chmod 644 {} +
#+end_src

I had this instead that worked :
#+begin_src bash
find -L . \
 \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
  -o -perm 511 -o -perm 2755 \) -exec chmod 00755 {} + -o \
 \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
  -o -perm 440 -o -perm 400 \) -exec chmod 644 {} +
#+end_src

The thing might be improved (other setgid numbers or search for -perm 755 ?)
but I think it might be interesting to have the setgid resetted by default. 

-- 
Regards,
Tonus.


More information about the SlackBuilds-users mailing list