alecsargent@lemmy.zip to linuxmemes@lemmy.world · 4 days agoIt's all about those little file mode bitslemmy.zipexternal-linkmessage-square73linkfedilinkarrow-up1272arrow-down126file-text
arrow-up1246arrow-down1external-linkIt's all about those little file mode bitslemmy.zipalecsargent@lemmy.zip to linuxmemes@lemmy.world · 4 days agomessage-square73linkfedilinkfile-text
minus-squareEphera@lemmy.mllinkfedilinkarrow-up60·4 days agoYeah, not only does +x leave read/write permissions untouched, it also only makes it executable for the user, not for everyone and their cat.
minus-squaredimmuborgnine@lemmy.worldlinkfedilinkarrow-up5·2 days agoIf your cat isn’t the first entry in /etc/sudoers I’m not sure I want to know you
minus-squareMr.Chewy@lemmy.worldlinkfedilinkarrow-up25·4 days agoCat doesn’t execute anything tho, it just reads and gives output
minus-squarefartographer@lemmy.worldlinkfedilinkarrow-up1·2 days agoOr am I??? x='dumb.txt' && echo "ls | grep $x && cat $x && rm -v $x" > $x && cat $x | bash
minus-squareSaharaMaleikuhm@feddit.orglinkfedilinkarrow-up10·3 days agoThe cat command executes the cat program.
minus-squarequantumvoid0@programming.devlinkfedilinkEnglisharrow-up5·3 days agoWhat happens when u try to cat the cat program, is that considered reading or executing
minus-squareNominatedNemesis@reddthat.comlinkfedilinkarrow-up5·3 days agoBoth, they are not mutually exclusive.
minus-squareNominatedNemesis@reddthat.comlinkfedilinkarrow-up5·3 days agoExcept if you use kitty terminal emulator with unsecure remote access. Issue Then with cat, you could execute arbitrary commands…
minus-squaredimmuborgnine@lemmy.worldlinkfedilinkarrow-up1arrow-down2·2 days agoIf your cat isn’t the first entry in /etc/sudoers I’m not sure I want to know you
But those are different
Yeah, not only does
+xleave read/write permissions untouched, it also only makes it executable for the user, not for everyone and their cat.If your cat isn’t the first entry in /etc/sudoers I’m not sure I want to know you
Cat doesn’t execute anything tho, it just reads and gives output
Or am I???
x='dumb.txt' && echo "ls | grep $x && cat $x && rm -v $x" > $x && cat $x | bashThe cat command executes the cat program.
What happens when u try to cat the cat program, is that considered reading or executing
Both, they are not mutually exclusive.
Except if you use kitty terminal emulator with unsecure remote access. Issue
Then with cat, you could execute arbitrary commands…
If your cat isn’t the first entry in /etc/sudoers I’m not sure I want to know you
Had to be done for the joke. :)