What does the permission string lrwxrwxrw mean?
when I cd to /
and enter the command:
ls -lstr
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
add a comment |
when I cd to /
and enter the command:
ls -lstr
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
1
Possible duplicate of How do you view file permissions?
– Kulfy
1 hour ago
add a comment |
when I cd to /
and enter the command:
ls -lstr
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 -lstr
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 1 hour ago
Zanna
50.1k13131240
50.1k13131240
New contributor
asked 1 hour ago
idaljeetsingh
113
113
New contributor
New contributor
1
Possible duplicate of How do you view file permissions?
– Kulfy
1 hour ago
add a comment |
1
Possible duplicate of How do you view file permissions?
– Kulfy
1 hour ago
1
1
Possible duplicate of How do you view file permissions?
– Kulfy
1 hour ago
Possible duplicate of How do you view file permissions?
– Kulfy
1 hour ago
add a comment |
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 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
16 mins ago
1
@wjandrea awesome! thanks :D I edited
– Zanna
13 mins ago
add a 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-lrwxrwxrw-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 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
16 mins ago
1
@wjandrea awesome! thanks :D I edited
– Zanna
13 mins ago
add a 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 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
16 mins ago
1
@wjandrea awesome! thanks :D I edited
– Zanna
13 mins ago
add a 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 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 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 14 mins ago
answered 1 hour ago
Zanna
50.1k13131240
50.1k13131240
1
No need to usereadlink
, just use option-L
to dereference symlinks. You can dostat -L
orls -L
.
– wjandrea
16 mins ago
1
@wjandrea awesome! thanks :D I edited
– Zanna
13 mins ago
add a comment |
1
No need to usereadlink
, just use option-L
to dereference symlinks. You can dostat -L
orls -L
.
– wjandrea
16 mins ago
1
@wjandrea awesome! thanks :D I edited
– Zanna
13 mins ago
1
1
No need to use
readlink
, just use option -L
to dereference symlinks. You can do stat -L
or ls -L
.– wjandrea
16 mins ago
No need to use
readlink
, just use option -L
to dereference symlinks. You can do stat -L
or ls -L
.– wjandrea
16 mins ago
1
1
@wjandrea awesome! thanks :D I edited
– Zanna
13 mins ago
@wjandrea awesome! thanks :D I edited
– Zanna
13 mins ago
add a 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-lrwxrwxrw-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
1
Possible duplicate of How do you view file permissions?
– Kulfy
1 hour ago