ls -F OR ls -al - What does the red highlighting mean? [duplicate]
Clash 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?
linux security ls
marked as duplicate by Stephen Kitt
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.
add a comment |Â
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?
linux security ls
marked as duplicate by Stephen Kitt
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.
add a comment |Â
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?
linux security ls
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?
This question already has an answer here:
What causes this green background in ls output?
8 answers
linux security ls
linux security ls
asked Sep 3 at 11:30
John Von Neumann
1387
1387
marked as duplicate by Stephen Kitt
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
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.
add a comment |Â
add a comment |Â
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.
add a comment |Â
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
.
Further information can be found at:
https://en.wikipedia.org/wiki/Setuid
add a comment |Â
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.
add a comment |Â
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.
add a comment |Â
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.
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.
edited Sep 3 at 14:46
Stéphane Chazelas
286k53527866
286k53527866
answered Sep 3 at 12:44
HBruijn
5,4361425
5,4361425
add a comment |Â
add a comment |Â
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
.
Further information can be found at:
https://en.wikipedia.org/wiki/Setuid
add a comment |Â
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
.
Further information can be found at:
https://en.wikipedia.org/wiki/Setuid
add a comment |Â
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
.
Further information can be found at:
https://en.wikipedia.org/wiki/Setuid
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
.
Further information can be found at:
https://en.wikipedia.org/wiki/Setuid
answered Sep 3 at 11:30
John Von Neumann
1387
1387
add a comment |Â
add a comment |Â