-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Hi, I noticed when we run this command to set some permission for the source
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 {} \;
if it had some symlink that would point to a root file or directory ?? that could change the permission of a root own file, that could be really dangerous right ? When we unpack the tar ball its a mystery back box sometimes and that could go really wrong.
This one should ignore the symlinks with "! type l"? I think that is more safe? or am I wrong ? tell me.
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
! -type l -exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
! -type l -exec chmod 644 {} \;
Metadata
Metadata
Assignees
Labels
No labels