alecsargent@lemmy.zip to linuxmemes@lemmy.world · edit-211 days agoIt's all about those little file mode bitslemmy.zipexternal-linkmessage-square73fedilinkarrow-up1279arrow-down125file-text
arrow-up1254arrow-down1external-linkIt's all about those little file mode bitslemmy.zipalecsargent@lemmy.zip to linuxmemes@lemmy.world · edit-211 days agomessage-square73fedilinkfile-text
minus-squareEphera@lemmy.mllinkfedilinkarrow-up60·11 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-squareMr.Chewy@lemmy.worldlinkfedilinkarrow-up25·10 days agoCat doesn’t execute anything tho, it just reads and gives output
minus-squareSaharaMaleikuhm@feddit.orglinkfedilinkarrow-up10·10 days agoThe cat command executes the cat program.
minus-squarequantumvoid0@programming.devlinkfedilinkEnglisharrow-up5·10 days agoWhat happens when u try to cat the cat program, is that considered reading or executing
minus-squareNominatedNemesis@reddthat.comlinkfedilinkarrow-up5·10 days agoBoth, they are not mutually exclusive.
minus-squareNominatedNemesis@reddthat.comlinkfedilinkarrow-up5·edit-210 days agoExcept if you use kitty terminal emulator with unsecure remote access. Issue Then with cat, you could execute arbitrary commands…
minus-squarefartographer@lemmy.worldlinkfedilinkarrow-up1·9 days agoOr am I??? x='dumb.txt' && echo "ls | grep $x && cat $x && rm -v $x" > $x && cat $x | bash
minus-squaredimmuborgnine@lemmy.worldlinkfedilinkarrow-up5·9 days agoIf your cat isn’t the first entry in /etc/sudoers I’m not sure I want to know you
minus-squaredimmuborgnine@lemmy.worldlinkfedilinkarrow-up1arrow-down2·9 days agoIf your cat isn’t the first entry in /etc/sudoers I’m not sure I want to know you
Yeah, not only does
+xleave read/write permissions untouched, it also only makes it executable for the user, not for everyone and their cat.Cat doesn’t execute anything tho, it just reads and gives output
The 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…
Or am I???
x='dumb.txt' && echo "ls | grep $x && cat $x && rm -v $x" > $x && cat $x | bashIf your cat isn’t the first entry in /etc/sudoers I’m not sure I want to know you
If your cat isn’t the first entry in /etc/sudoers I’m not sure I want to know you