What does the permission string lrwxrwxrwx mean?
when I cd to /
and enter the command:
ls -ls
For some files/folders it gives output like
0 lrwxrwxrwx. 1 root root 7 Jan 30 2018 bin -> usr/bin
So what actually is this lrwxrwxrwx
?
permissions
New contributor
|
show 3 more comments
when I cd to /
and enter the command:
ls -ls
For some files/folders it gives output like
0 lrwxrwxrwx. 1 root root 7 Jan 30 2018 bin -> usr/bin
So what actually is this lrwxrwxrwx
?
permissions
New contributor
2
@Kulfy I think the fact that OP providedls -l
in their question suggests they already know how to view permissions. They're more interested in the meaning of the output in this particular case of symlinks. So I don't think that's an appropriate duplicate
– Sergiy Kolodyazhnyy
7 hours ago
@Serg g_p's answer has the info OP is looking for, but I agree it's not a duplicate question.
– wjandrea
6 hours ago
@Serg The dup Q&A is generically orientated on meaning of permissions. If a question oflwrxwrxwrx
(see/vmlinuz
) like this is unique, would a question ofdwrxwrxwrx
(see/tmp/
) be unique as well? If each combination of permissions is a unique question we can have untold number of what could be considered psuedo-dups. For example "What does permissions ofdr-xr-xr-x
for/proc
directory mean"?.
– WinEunuuchs2Unix
5 hours ago
2
@WinEunuuchs2Unix While I agree the dup is general and should cover wide range, including this one, this question happens to talk about specific file type and the set of permissionslrwxrwxrwx
is typical to all symlinks, which Zanna's answer covered very well in detail. If you feel like this should be covered in the linked dup, feel free to either post an answer or edit the existing ones there.
– Sergiy Kolodyazhnyy
5 hours ago
1
@WinEunuuchs2Unix That's a slippery slope fallacy. The purpose of the duplicates is to provide appropriate information, not cover everything, nor they are meant to prevent people from asking similar questions. I've already expressed my opinion - Zanna's post here does better job than what's covered in the link, and the questions differ somewhat. The rest may the community decide
– Sergiy Kolodyazhnyy
5 hours ago
|
show 3 more comments
when I cd to /
and enter the command:
ls -ls
For some files/folders it gives output like
0 lrwxrwxrwx. 1 root root 7 Jan 30 2018 bin -> usr/bin
So what actually is this lrwxrwxrwx
?
permissions
New contributor
when I cd to /
and enter the command:
ls -ls
For some files/folders it gives output like
0 lrwxrwxrwx. 1 root root 7 Jan 30 2018 bin -> usr/bin
So what actually is this lrwxrwxrwx
?
permissions
permissions
New contributor
New contributor
edited 5 hours ago
wjandrea
8,44242259
8,44242259
New contributor
asked 13 hours ago
idaljeetsingh
334
334
New contributor
New contributor
2
@Kulfy I think the fact that OP providedls -l
in their question suggests they already know how to view permissions. They're more interested in the meaning of the output in this particular case of symlinks. So I don't think that's an appropriate duplicate
– Sergiy Kolodyazhnyy
7 hours ago
@Serg g_p's answer has the info OP is looking for, but I agree it's not a duplicate question.
– wjandrea
6 hours ago
@Serg The dup Q&A is generically orientated on meaning of permissions. If a question oflwrxwrxwrx
(see/vmlinuz
) like this is unique, would a question ofdwrxwrxwrx
(see/tmp/
) be unique as well? If each combination of permissions is a unique question we can have untold number of what could be considered psuedo-dups. For example "What does permissions ofdr-xr-xr-x
for/proc
directory mean"?.
– WinEunuuchs2Unix
5 hours ago
2
@WinEunuuchs2Unix While I agree the dup is general and should cover wide range, including this one, this question happens to talk about specific file type and the set of permissionslrwxrwxrwx
is typical to all symlinks, which Zanna's answer covered very well in detail. If you feel like this should be covered in the linked dup, feel free to either post an answer or edit the existing ones there.
– Sergiy Kolodyazhnyy
5 hours ago
1
@WinEunuuchs2Unix That's a slippery slope fallacy. The purpose of the duplicates is to provide appropriate information, not cover everything, nor they are meant to prevent people from asking similar questions. I've already expressed my opinion - Zanna's post here does better job than what's covered in the link, and the questions differ somewhat. The rest may the community decide
– Sergiy Kolodyazhnyy
5 hours ago
|
show 3 more comments
2
@Kulfy I think the fact that OP providedls -l
in their question suggests they already know how to view permissions. They're more interested in the meaning of the output in this particular case of symlinks. So I don't think that's an appropriate duplicate
– Sergiy Kolodyazhnyy
7 hours ago
@Serg g_p's answer has the info OP is looking for, but I agree it's not a duplicate question.
– wjandrea
6 hours ago
@Serg The dup Q&A is generically orientated on meaning of permissions. If a question oflwrxwrxwrx
(see/vmlinuz
) like this is unique, would a question ofdwrxwrxwrx
(see/tmp/
) be unique as well? If each combination of permissions is a unique question we can have untold number of what could be considered psuedo-dups. For example "What does permissions ofdr-xr-xr-x
for/proc
directory mean"?.
– WinEunuuchs2Unix
5 hours ago
2
@WinEunuuchs2Unix While I agree the dup is general and should cover wide range, including this one, this question happens to talk about specific file type and the set of permissionslrwxrwxrwx
is typical to all symlinks, which Zanna's answer covered very well in detail. If you feel like this should be covered in the linked dup, feel free to either post an answer or edit the existing ones there.
– Sergiy Kolodyazhnyy
5 hours ago
1
@WinEunuuchs2Unix That's a slippery slope fallacy. The purpose of the duplicates is to provide appropriate information, not cover everything, nor they are meant to prevent people from asking similar questions. I've already expressed my opinion - Zanna's post here does better job than what's covered in the link, and the questions differ somewhat. The rest may the community decide
– Sergiy Kolodyazhnyy
5 hours ago
2
2
@Kulfy I think the fact that OP provided
ls -l
in their question suggests they already know how to view permissions. They're more interested in the meaning of the output in this particular case of symlinks. So I don't think that's an appropriate duplicate– Sergiy Kolodyazhnyy
7 hours ago
@Kulfy I think the fact that OP provided
ls -l
in their question suggests they already know how to view permissions. They're more interested in the meaning of the output in this particular case of symlinks. So I don't think that's an appropriate duplicate– Sergiy Kolodyazhnyy
7 hours ago
@Serg g_p's answer has the info OP is looking for, but I agree it's not a duplicate question.
– wjandrea
6 hours ago
@Serg g_p's answer has the info OP is looking for, but I agree it's not a duplicate question.
– wjandrea
6 hours ago
@Serg The dup Q&A is generically orientated on meaning of permissions. If a question of
lwrxwrxwrx
(see /vmlinuz
) like this is unique, would a question of dwrxwrxwrx
(see /tmp/
) be unique as well? If each combination of permissions is a unique question we can have untold number of what could be considered psuedo-dups. For example "What does permissions of dr-xr-xr-x
for /proc
directory mean"?.– WinEunuuchs2Unix
5 hours ago
@Serg The dup Q&A is generically orientated on meaning of permissions. If a question of
lwrxwrxwrx
(see /vmlinuz
) like this is unique, would a question of dwrxwrxwrx
(see /tmp/
) be unique as well? If each combination of permissions is a unique question we can have untold number of what could be considered psuedo-dups. For example "What does permissions of dr-xr-xr-x
for /proc
directory mean"?.– WinEunuuchs2Unix
5 hours ago
2
2
@WinEunuuchs2Unix While I agree the dup is general and should cover wide range, including this one, this question happens to talk about specific file type and the set of permissions
lrwxrwxrwx
is typical to all symlinks, which Zanna's answer covered very well in detail. If you feel like this should be covered in the linked dup, feel free to either post an answer or edit the existing ones there.– Sergiy Kolodyazhnyy
5 hours ago
@WinEunuuchs2Unix While I agree the dup is general and should cover wide range, including this one, this question happens to talk about specific file type and the set of permissions
lrwxrwxrwx
is typical to all symlinks, which Zanna's answer covered very well in detail. If you feel like this should be covered in the linked dup, feel free to either post an answer or edit the existing ones there.– Sergiy Kolodyazhnyy
5 hours ago
1
1
@WinEunuuchs2Unix That's a slippery slope fallacy. The purpose of the duplicates is to provide appropriate information, not cover everything, nor they are meant to prevent people from asking similar questions. I've already expressed my opinion - Zanna's post here does better job than what's covered in the link, and the questions differ somewhat. The rest may the community decide
– Sergiy Kolodyazhnyy
5 hours ago
@WinEunuuchs2Unix That's a slippery slope fallacy. The purpose of the duplicates is to provide appropriate information, not cover everything, nor they are meant to prevent people from asking similar questions. I've already expressed my opinion - Zanna's post here does better job than what's covered in the link, and the questions differ somewhat. The rest may the community decide
– Sergiy Kolodyazhnyy
5 hours ago
|
show 3 more comments
1 Answer
1
active
oldest
votes
The leading l
indicates that this file is a symlink, in contrast to -
which indicates a regular file, d
which indicates a directory, and other less common prefixes.
A symlink is type of file which only contains a link to another file. Reading a symlink reads the real file. Writing to a symlink writes to the real file. cd
ing to a symlink that is to a directory results in behaviour almost identical to what would happen if you had cd
'd into the real directory.
The permission bits are displayed as rwxrwxrwx
. All symlinks show these bits, but they are "dummy permissions". The actual (or effective) permissions of a symlink are the permissions of the real file it links to. You can get the real permissions (and file type) by running stat
on the symlink, for example:
$ stat -Lc '%a %A' /initrd.img
644 -rw-r--r--
stat
read file metadata
-L
dereference (follow) symlinks
-c
select output according to specified string
%a
octal permissions
%A
"human readable" permissions
1
No need to usereadlink
, just use option-L
to dereference symlinks. You can dostat -L
orls -L
.
– wjandrea
11 hours ago
1
@wjandrea awesome! thanks :D I edited
– Zanna
11 hours ago
1
ls
also has a-L
option to follow the link.
– Barmar
11 hours ago
@Barmar good point :)
– Zanna
11 hours ago
The actual permissions of a symlink are the permissions of the real file it links to.
Um, not quite. This needs to be reworded. Symlinks are symlinks - you already mentioned they show dummy permissions that all symlinks show, and actual file is different from symlink. Nonetheless, good and detailed answer. +1'ed already
– Sergiy Kolodyazhnyy
7 hours ago
|
show 1 more comment
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
idaljeetsingh is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1106662%2fwhat-does-the-permission-string-lrwxrwxrwx-mean%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
The leading l
indicates that this file is a symlink, in contrast to -
which indicates a regular file, d
which indicates a directory, and other less common prefixes.
A symlink is type of file which only contains a link to another file. Reading a symlink reads the real file. Writing to a symlink writes to the real file. cd
ing to a symlink that is to a directory results in behaviour almost identical to what would happen if you had cd
'd into the real directory.
The permission bits are displayed as rwxrwxrwx
. All symlinks show these bits, but they are "dummy permissions". The actual (or effective) permissions of a symlink are the permissions of the real file it links to. You can get the real permissions (and file type) by running stat
on the symlink, for example:
$ stat -Lc '%a %A' /initrd.img
644 -rw-r--r--
stat
read file metadata
-L
dereference (follow) symlinks
-c
select output according to specified string
%a
octal permissions
%A
"human readable" permissions
1
No need to usereadlink
, just use option-L
to dereference symlinks. You can dostat -L
orls -L
.
– wjandrea
11 hours ago
1
@wjandrea awesome! thanks :D I edited
– Zanna
11 hours ago
1
ls
also has a-L
option to follow the link.
– Barmar
11 hours ago
@Barmar good point :)
– Zanna
11 hours ago
The actual permissions of a symlink are the permissions of the real file it links to.
Um, not quite. This needs to be reworded. Symlinks are symlinks - you already mentioned they show dummy permissions that all symlinks show, and actual file is different from symlink. Nonetheless, good and detailed answer. +1'ed already
– Sergiy Kolodyazhnyy
7 hours ago
|
show 1 more comment
The leading l
indicates that this file is a symlink, in contrast to -
which indicates a regular file, d
which indicates a directory, and other less common prefixes.
A symlink is type of file which only contains a link to another file. Reading a symlink reads the real file. Writing to a symlink writes to the real file. cd
ing to a symlink that is to a directory results in behaviour almost identical to what would happen if you had cd
'd into the real directory.
The permission bits are displayed as rwxrwxrwx
. All symlinks show these bits, but they are "dummy permissions". The actual (or effective) permissions of a symlink are the permissions of the real file it links to. You can get the real permissions (and file type) by running stat
on the symlink, for example:
$ stat -Lc '%a %A' /initrd.img
644 -rw-r--r--
stat
read file metadata
-L
dereference (follow) symlinks
-c
select output according to specified string
%a
octal permissions
%A
"human readable" permissions
1
No need to usereadlink
, just use option-L
to dereference symlinks. You can dostat -L
orls -L
.
– wjandrea
11 hours ago
1
@wjandrea awesome! thanks :D I edited
– Zanna
11 hours ago
1
ls
also has a-L
option to follow the link.
– Barmar
11 hours ago
@Barmar good point :)
– Zanna
11 hours ago
The actual permissions of a symlink are the permissions of the real file it links to.
Um, not quite. This needs to be reworded. Symlinks are symlinks - you already mentioned they show dummy permissions that all symlinks show, and actual file is different from symlink. Nonetheless, good and detailed answer. +1'ed already
– Sergiy Kolodyazhnyy
7 hours ago
|
show 1 more comment
The leading l
indicates that this file is a symlink, in contrast to -
which indicates a regular file, d
which indicates a directory, and other less common prefixes.
A symlink is type of file which only contains a link to another file. Reading a symlink reads the real file. Writing to a symlink writes to the real file. cd
ing to a symlink that is to a directory results in behaviour almost identical to what would happen if you had cd
'd into the real directory.
The permission bits are displayed as rwxrwxrwx
. All symlinks show these bits, but they are "dummy permissions". The actual (or effective) permissions of a symlink are the permissions of the real file it links to. You can get the real permissions (and file type) by running stat
on the symlink, for example:
$ stat -Lc '%a %A' /initrd.img
644 -rw-r--r--
stat
read file metadata
-L
dereference (follow) symlinks
-c
select output according to specified string
%a
octal permissions
%A
"human readable" permissions
The leading l
indicates that this file is a symlink, in contrast to -
which indicates a regular file, d
which indicates a directory, and other less common prefixes.
A symlink is type of file which only contains a link to another file. Reading a symlink reads the real file. Writing to a symlink writes to the real file. cd
ing to a symlink that is to a directory results in behaviour almost identical to what would happen if you had cd
'd into the real directory.
The permission bits are displayed as rwxrwxrwx
. All symlinks show these bits, but they are "dummy permissions". The actual (or effective) permissions of a symlink are the permissions of the real file it links to. You can get the real permissions (and file type) by running stat
on the symlink, for example:
$ stat -Lc '%a %A' /initrd.img
644 -rw-r--r--
stat
read file metadata
-L
dereference (follow) symlinks
-c
select output according to specified string
%a
octal permissions
%A
"human readable" permissions
edited 8 mins ago
answered 12 hours ago
Zanna
50.2k13132241
50.2k13132241
1
No need to usereadlink
, just use option-L
to dereference symlinks. You can dostat -L
orls -L
.
– wjandrea
11 hours ago
1
@wjandrea awesome! thanks :D I edited
– Zanna
11 hours ago
1
ls
also has a-L
option to follow the link.
– Barmar
11 hours ago
@Barmar good point :)
– Zanna
11 hours ago
The actual permissions of a symlink are the permissions of the real file it links to.
Um, not quite. This needs to be reworded. Symlinks are symlinks - you already mentioned they show dummy permissions that all symlinks show, and actual file is different from symlink. Nonetheless, good and detailed answer. +1'ed already
– Sergiy Kolodyazhnyy
7 hours ago
|
show 1 more comment
1
No need to usereadlink
, just use option-L
to dereference symlinks. You can dostat -L
orls -L
.
– wjandrea
11 hours ago
1
@wjandrea awesome! thanks :D I edited
– Zanna
11 hours ago
1
ls
also has a-L
option to follow the link.
– Barmar
11 hours ago
@Barmar good point :)
– Zanna
11 hours ago
The actual permissions of a symlink are the permissions of the real file it links to.
Um, not quite. This needs to be reworded. Symlinks are symlinks - you already mentioned they show dummy permissions that all symlinks show, and actual file is different from symlink. Nonetheless, good and detailed answer. +1'ed already
– Sergiy Kolodyazhnyy
7 hours ago
1
1
No need to use
readlink
, just use option -L
to dereference symlinks. You can do stat -L
or ls -L
.– wjandrea
11 hours ago
No need to use
readlink
, just use option -L
to dereference symlinks. You can do stat -L
or ls -L
.– wjandrea
11 hours ago
1
1
@wjandrea awesome! thanks :D I edited
– Zanna
11 hours ago
@wjandrea awesome! thanks :D I edited
– Zanna
11 hours ago
1
1
ls
also has a -L
option to follow the link.– Barmar
11 hours ago
ls
also has a -L
option to follow the link.– Barmar
11 hours ago
@Barmar good point :)
– Zanna
11 hours ago
@Barmar good point :)
– Zanna
11 hours ago
The actual permissions of a symlink are the permissions of the real file it links to.
Um, not quite. This needs to be reworded. Symlinks are symlinks - you already mentioned they show dummy permissions that all symlinks show, and actual file is different from symlink. Nonetheless, good and detailed answer. +1'ed already– Sergiy Kolodyazhnyy
7 hours ago
The actual permissions of a symlink are the permissions of the real file it links to.
Um, not quite. This needs to be reworded. Symlinks are symlinks - you already mentioned they show dummy permissions that all symlinks show, and actual file is different from symlink. Nonetheless, good and detailed answer. +1'ed already– Sergiy Kolodyazhnyy
7 hours ago
|
show 1 more comment
idaljeetsingh is a new contributor. Be nice, and check out our Code of Conduct.
idaljeetsingh is a new contributor. Be nice, and check out our Code of Conduct.
idaljeetsingh is a new contributor. Be nice, and check out our Code of Conduct.
idaljeetsingh is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1106662%2fwhat-does-the-permission-string-lrwxrwxrwx-mean%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
2
@Kulfy I think the fact that OP provided
ls -l
in their question suggests they already know how to view permissions. They're more interested in the meaning of the output in this particular case of symlinks. So I don't think that's an appropriate duplicate– Sergiy Kolodyazhnyy
7 hours ago
@Serg g_p's answer has the info OP is looking for, but I agree it's not a duplicate question.
– wjandrea
6 hours ago
@Serg The dup Q&A is generically orientated on meaning of permissions. If a question of
lwrxwrxwrx
(see/vmlinuz
) like this is unique, would a question ofdwrxwrxwrx
(see/tmp/
) be unique as well? If each combination of permissions is a unique question we can have untold number of what could be considered psuedo-dups. For example "What does permissions ofdr-xr-xr-x
for/proc
directory mean"?.– WinEunuuchs2Unix
5 hours ago
2
@WinEunuuchs2Unix While I agree the dup is general and should cover wide range, including this one, this question happens to talk about specific file type and the set of permissions
lrwxrwxrwx
is typical to all symlinks, which Zanna's answer covered very well in detail. If you feel like this should be covered in the linked dup, feel free to either post an answer or edit the existing ones there.– Sergiy Kolodyazhnyy
5 hours ago
1
@WinEunuuchs2Unix That's a slippery slope fallacy. The purpose of the duplicates is to provide appropriate information, not cover everything, nor they are meant to prevent people from asking similar questions. I've already expressed my opinion - Zanna's post here does better job than what's covered in the link, and the questions differ somewhat. The rest may the community decide
– Sergiy Kolodyazhnyy
5 hours ago