apply_binaries.sh changes permission of custom rootfs

I’ve been trying to flash a custom rootfs using the jetpack scripts. It seems that after replacing the sample rootfs, with a custom one, and running the apply_binaries.sh script, files with permissions as

-rwsr-xr-x

are changed to

-rwxr-xr-x

. This creates an immediate problem with being able to execute sudo commands, however, other programs e.g ping, are also affected (these commands only work when run with sudo now)

You must run apply_binaries.sh with “sudo” (with root permissions):

# To a custom rootfs location:
sudo ./apply_binaries.sh -r /where/ever/it/goes
# Or to standard rootfs subdirectory:
sudo ./apply_binaries.sh

Note that if anything was unpacked in the rootfs without sudo, then probably that component is no longer valid. If the only thing unpacked without root permissions was apply_binaries.sh, then you only need to re-run apply_binaries.sh with sudo. If you unpacked your sample rootfs there without sudo, then you need to start over after deleting the entire content of the rootfs.