[Slackbuilds-users] Improvment in templates considering permissions

B. Watson urchlay at slackware.uk
Mon Aug 18 05:18:11 UTC 2025



On Mon, 18 Aug 2025, Tonus via SlackBuilds-users wrote:

> 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.

I've been using this for years:

find -L .  -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \
         \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} +

Instead of listing every possible wrong permission, list the ones that
are correct, with a ! for "not". It's also less code and easier to
read, IMO.


More information about the SlackBuilds-users mailing list