What does the permission string lrwxrwxrw mean?












2














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?










share|improve this question









New contributor




idaljeetsingh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
















  • 1




    Possible duplicate of How do you view file permissions?
    – Kulfy
    1 hour ago
















2














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?










share|improve this question









New contributor




idaljeetsingh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
















  • 1




    Possible duplicate of How do you view file permissions?
    – Kulfy
    1 hour ago














2












2








2







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?










share|improve this question









New contributor




idaljeetsingh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











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






share|improve this question









New contributor




idaljeetsingh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




idaljeetsingh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited 1 hour ago









Zanna

50.1k13131240




50.1k13131240






New contributor




idaljeetsingh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 1 hour ago









idaljeetsingh

113




113




New contributor




idaljeetsingh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





idaljeetsingh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






idaljeetsingh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








  • 1




    Possible duplicate of How do you view file permissions?
    – Kulfy
    1 hour ago














  • 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










1 Answer
1






active

oldest

votes


















5














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. cding 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






share|improve this answer



















  • 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








  • 1




    @wjandrea awesome! thanks :D I edited
    – Zanna
    13 mins ago











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.










draft saved

draft discarded


















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









5














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. cding 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






share|improve this answer



















  • 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








  • 1




    @wjandrea awesome! thanks :D I edited
    – Zanna
    13 mins ago
















5














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. cding 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






share|improve this answer



















  • 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








  • 1




    @wjandrea awesome! thanks :D I edited
    – Zanna
    13 mins ago














5












5








5






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. cding 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






share|improve this answer














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. cding 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







share|improve this answer














share|improve this answer



share|improve this answer








edited 14 mins ago

























answered 1 hour ago









Zanna

50.1k13131240




50.1k13131240








  • 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








  • 1




    @wjandrea awesome! thanks :D I edited
    – Zanna
    13 mins ago














  • 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








  • 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










idaljeetsingh is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















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.




draft saved


draft discarded














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





















































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







Popular posts from this blog

Understanding the information contained in the Deep Space Network XML data?

Ross-on-Wye

Eastern Orthodox Church