ls -F OR ls -al - What does the red highlighting mean? [duplicate]

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite













This question already has an answer here:



  • What causes this green background in ls output?

    8 answers



So I ran a ls -F or ls -al on my /usr/bin directory and some of my files showed up with a red background and white text. What does this mean?



enter image description here










share|improve this question













marked as duplicate by Stephen Kitt linux
Users with the  linux badge can single-handedly close linux questions as duplicates and reopen them as needed.

StackExchange.ready(function()
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();

);
);
);
Sep 3 at 12:57


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.





migrated from serverfault.com Sep 3 at 12:44


This question came from our site for system and network administrators.


















    up vote
    1
    down vote

    favorite













    This question already has an answer here:



    • What causes this green background in ls output?

      8 answers



    So I ran a ls -F or ls -al on my /usr/bin directory and some of my files showed up with a red background and white text. What does this mean?



    enter image description here










    share|improve this question













    marked as duplicate by Stephen Kitt linux
    Users with the  linux badge can single-handedly close linux questions as duplicates and reopen them as needed.

    StackExchange.ready(function()
    if (StackExchange.options.isMobile) return;

    $('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
    var $hover = $(this).addClass('hover-bound'),
    $msg = $hover.siblings('.dupe-hammer-message');

    $hover.hover(
    function()
    $hover.showInfoMessage('',
    messageElement: $msg.clone().show(),
    transient: false,
    position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
    dismissable: false,
    relativeToBody: true
    );
    ,
    function()
    StackExchange.helpers.removeMessages();

    );
    );
    );
    Sep 3 at 12:57


    This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.





    migrated from serverfault.com Sep 3 at 12:44


    This question came from our site for system and network administrators.
















      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite












      This question already has an answer here:



      • What causes this green background in ls output?

        8 answers



      So I ran a ls -F or ls -al on my /usr/bin directory and some of my files showed up with a red background and white text. What does this mean?



      enter image description here










      share|improve this question














      This question already has an answer here:



      • What causes this green background in ls output?

        8 answers



      So I ran a ls -F or ls -al on my /usr/bin directory and some of my files showed up with a red background and white text. What does this mean?



      enter image description here





      This question already has an answer here:



      • What causes this green background in ls output?

        8 answers







      linux security ls






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Sep 3 at 11:30









      John Von Neumann

      1387




      1387




      marked as duplicate by Stephen Kitt linux
      Users with the  linux badge can single-handedly close linux questions as duplicates and reopen them as needed.

      StackExchange.ready(function()
      if (StackExchange.options.isMobile) return;

      $('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
      var $hover = $(this).addClass('hover-bound'),
      $msg = $hover.siblings('.dupe-hammer-message');

      $hover.hover(
      function()
      $hover.showInfoMessage('',
      messageElement: $msg.clone().show(),
      transient: false,
      position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
      dismissable: false,
      relativeToBody: true
      );
      ,
      function()
      StackExchange.helpers.removeMessages();

      );
      );
      );
      Sep 3 at 12:57


      This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.





      migrated from serverfault.com Sep 3 at 12:44


      This question came from our site for system and network administrators.






      marked as duplicate by Stephen Kitt linux
      Users with the  linux badge can single-handedly close linux questions as duplicates and reopen them as needed.

      StackExchange.ready(function()
      if (StackExchange.options.isMobile) return;

      $('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
      var $hover = $(this).addClass('hover-bound'),
      $msg = $hover.siblings('.dupe-hammer-message');

      $hover.hover(
      function()
      $hover.showInfoMessage('',
      messageElement: $msg.clone().show(),
      transient: false,
      position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
      dismissable: false,
      relativeToBody: true
      );
      ,
      function()
      StackExchange.helpers.removeMessages();

      );
      );
      );
      Sep 3 at 12:57


      This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.





      migrated from serverfault.com Sep 3 at 12:44


      This question came from our site for system and network administrators.






















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          6
          down vote













          With the GNU implementation of ls, the meaning of the colours depends on the setting of the LS_COLORS environment variable, typically set up with the dircolors command.



          A (combination of) numeric code(s) determines which colours get used to indicate a particular file type:



          # Attribute codes:
          # 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed
          # Text color codes:
          # 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white
          # Background color codes:
          # 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white


          A white text on a red background is defined with a combination of 37;41



          Use echo "$LS_COLORS" to investigate and find that:
          su=37;41

          thus SETUID files are white text on a red background (which happens to be the default)



          dircolors --print-database gives a more verbose and readable output for the default settings in absence of any customisation:



          SETUID 37;41 # file that is setuid (u+s)
          STICKY 37;44 # dir with the sticky bit set (+t) and not other-writable


          The only other default usage for a red highlight is blue text on a red background for directories with the sticky bit set.






          share|improve this answer





























            up vote
            3
            down vote













            When you run an ls -al or ls -F, files listed with a red background and white text indicate that the setuid bit has been flipped. Meaning that the file/script/program will run as the user that owns it, not the user that ran it. As you can see from the picture, the ping and ping6 have their 4th bit set as s, whereas the others, where the setuid bit has not been flipped, show an x.



            enter image description here



            Further information can be found at:



            https://en.wikipedia.org/wiki/Setuid






            share|improve this answer



























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes








              up vote
              6
              down vote













              With the GNU implementation of ls, the meaning of the colours depends on the setting of the LS_COLORS environment variable, typically set up with the dircolors command.



              A (combination of) numeric code(s) determines which colours get used to indicate a particular file type:



              # Attribute codes:
              # 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed
              # Text color codes:
              # 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white
              # Background color codes:
              # 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white


              A white text on a red background is defined with a combination of 37;41



              Use echo "$LS_COLORS" to investigate and find that:
              su=37;41

              thus SETUID files are white text on a red background (which happens to be the default)



              dircolors --print-database gives a more verbose and readable output for the default settings in absence of any customisation:



              SETUID 37;41 # file that is setuid (u+s)
              STICKY 37;44 # dir with the sticky bit set (+t) and not other-writable


              The only other default usage for a red highlight is blue text on a red background for directories with the sticky bit set.






              share|improve this answer


























                up vote
                6
                down vote













                With the GNU implementation of ls, the meaning of the colours depends on the setting of the LS_COLORS environment variable, typically set up with the dircolors command.



                A (combination of) numeric code(s) determines which colours get used to indicate a particular file type:



                # Attribute codes:
                # 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed
                # Text color codes:
                # 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white
                # Background color codes:
                # 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white


                A white text on a red background is defined with a combination of 37;41



                Use echo "$LS_COLORS" to investigate and find that:
                su=37;41

                thus SETUID files are white text on a red background (which happens to be the default)



                dircolors --print-database gives a more verbose and readable output for the default settings in absence of any customisation:



                SETUID 37;41 # file that is setuid (u+s)
                STICKY 37;44 # dir with the sticky bit set (+t) and not other-writable


                The only other default usage for a red highlight is blue text on a red background for directories with the sticky bit set.






                share|improve this answer
























                  up vote
                  6
                  down vote










                  up vote
                  6
                  down vote









                  With the GNU implementation of ls, the meaning of the colours depends on the setting of the LS_COLORS environment variable, typically set up with the dircolors command.



                  A (combination of) numeric code(s) determines which colours get used to indicate a particular file type:



                  # Attribute codes:
                  # 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed
                  # Text color codes:
                  # 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white
                  # Background color codes:
                  # 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white


                  A white text on a red background is defined with a combination of 37;41



                  Use echo "$LS_COLORS" to investigate and find that:
                  su=37;41

                  thus SETUID files are white text on a red background (which happens to be the default)



                  dircolors --print-database gives a more verbose and readable output for the default settings in absence of any customisation:



                  SETUID 37;41 # file that is setuid (u+s)
                  STICKY 37;44 # dir with the sticky bit set (+t) and not other-writable


                  The only other default usage for a red highlight is blue text on a red background for directories with the sticky bit set.






                  share|improve this answer














                  With the GNU implementation of ls, the meaning of the colours depends on the setting of the LS_COLORS environment variable, typically set up with the dircolors command.



                  A (combination of) numeric code(s) determines which colours get used to indicate a particular file type:



                  # Attribute codes:
                  # 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed
                  # Text color codes:
                  # 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white
                  # Background color codes:
                  # 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white


                  A white text on a red background is defined with a combination of 37;41



                  Use echo "$LS_COLORS" to investigate and find that:
                  su=37;41

                  thus SETUID files are white text on a red background (which happens to be the default)



                  dircolors --print-database gives a more verbose and readable output for the default settings in absence of any customisation:



                  SETUID 37;41 # file that is setuid (u+s)
                  STICKY 37;44 # dir with the sticky bit set (+t) and not other-writable


                  The only other default usage for a red highlight is blue text on a red background for directories with the sticky bit set.







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Sep 3 at 14:46









                  Stéphane Chazelas

                  286k53527866




                  286k53527866










                  answered Sep 3 at 12:44









                  HBruijn

                  5,4361425




                  5,4361425






















                      up vote
                      3
                      down vote













                      When you run an ls -al or ls -F, files listed with a red background and white text indicate that the setuid bit has been flipped. Meaning that the file/script/program will run as the user that owns it, not the user that ran it. As you can see from the picture, the ping and ping6 have their 4th bit set as s, whereas the others, where the setuid bit has not been flipped, show an x.



                      enter image description here



                      Further information can be found at:



                      https://en.wikipedia.org/wiki/Setuid






                      share|improve this answer
























                        up vote
                        3
                        down vote













                        When you run an ls -al or ls -F, files listed with a red background and white text indicate that the setuid bit has been flipped. Meaning that the file/script/program will run as the user that owns it, not the user that ran it. As you can see from the picture, the ping and ping6 have their 4th bit set as s, whereas the others, where the setuid bit has not been flipped, show an x.



                        enter image description here



                        Further information can be found at:



                        https://en.wikipedia.org/wiki/Setuid






                        share|improve this answer






















                          up vote
                          3
                          down vote










                          up vote
                          3
                          down vote









                          When you run an ls -al or ls -F, files listed with a red background and white text indicate that the setuid bit has been flipped. Meaning that the file/script/program will run as the user that owns it, not the user that ran it. As you can see from the picture, the ping and ping6 have their 4th bit set as s, whereas the others, where the setuid bit has not been flipped, show an x.



                          enter image description here



                          Further information can be found at:



                          https://en.wikipedia.org/wiki/Setuid






                          share|improve this answer












                          When you run an ls -al or ls -F, files listed with a red background and white text indicate that the setuid bit has been flipped. Meaning that the file/script/program will run as the user that owns it, not the user that ran it. As you can see from the picture, the ping and ping6 have their 4th bit set as s, whereas the others, where the setuid bit has not been flipped, show an x.



                          enter image description here



                          Further information can be found at:



                          https://en.wikipedia.org/wiki/Setuid







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Sep 3 at 11:30









                          John Von Neumann

                          1387




                          1387












                              Popular posts from this blog

                              How to check contact read email or not when send email to Individual?

                              Displaying single band from multi-band raster using QGIS

                              How many registers does an x86_64 CPU actually have?