Is it possible to change the permissions for the symbolic link?MySQL server config file permissions on Ubuntu 18.04how to change permissions of .gvfs in my home folderChange file permissions for the entire folderHelp with creating a symbolic linkSymbolic link for lampp isn't working 100%How to follow symbolic link with smb shareExecute binary inside symbolic link to separate LVM partitionAre these the right permissions for a webserverCreate symbolic link in the current web server document root permissionsSynologie NAS - Using Symbolic Link with SFTPPermissions error on mounted symbolic link

Do flight schools typically have dress codes or expectations?

What are the benefits of using the X Card safety tool in comparison to plain communication?

A player is constantly pestering me about rules, what do I do as a DM?

What sort of mathematical problems are there in AI that people are working on?

Going to get married soon, should I do it on Dec 31 or Jan 1?

Is my Rep in Stack-Exchange Form?

Does squid ink pasta bleed?

Can’t attend PhD conferences

Is there any evidence that the small canisters (10 liters) of 95% oxygen actually help with altitude sickness?

Is there any set of 2-6 notes that doesn't have a chord name?

Alphabet completion rate

How to reply to small talk/random facts in a non-offensive way?

Does ultrasonic bath cleaning damage laboratory volumetric glassware calibration?

Low-gravity Bronze Age fortifications

How come I was asked by a CBP officer why I was in the US?

Should I hide continue button until tasks are completed?

STM Microcontroller burns every time

Why aren't (poly-)cotton tents more popular?

What happens when your group is victim of a surprise attack but you can't be surprised?

Peace Arch without exiting USA

Are there any vegetarian astronauts?

How well known and how commonly used was Huffman coding in 1979?

Did Karl Marx ever use any example that involved cotton and dollars to illustrate the way capital and surplus value were generated?

Change CPU MHz from Registry



Is it possible to change the permissions for the symbolic link?


MySQL server config file permissions on Ubuntu 18.04how to change permissions of .gvfs in my home folderChange file permissions for the entire folderHelp with creating a symbolic linkSymbolic link for lampp isn't working 100%How to follow symbolic link with smb shareExecute binary inside symbolic link to separate LVM partitionAre these the right permissions for a webserverCreate symbolic link in the current web server document root permissionsSynologie NAS - Using Symbolic Link with SFTPPermissions error on mounted symbolic link






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















I am trying to change the permissions for the symbolic link.



Making directory and symbolic link



As how you can see in the image, the soft link has 777 permissions, but i would like to change that.



I tried to change that by:




  1. chmod 755 someLink - but this changes linked directory (someDir) permission.


  2. chmod -h 755 someLink - this brings eroor chmod: invalid option --'h'

Is there a way how to change symbolic link permissions? I am on Ubuntu 18.04



Many thanks in advance










share|improve this question









New contributor



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














  • 2





    -h is freebsd/openbsd so MacOS. Not Linux ;-) freebsd.org/cgi/man.cgi?query=chmod&manpath=SuSE+Linux/… Linux "chmod never changes the permissions of symbolic links; the chmod system call cannot change their permissions. This is not a problem since the permissions of symbolic links are never used. However, for each symbolic link listed on the command line, chmod changes the permissions of the pointed-to file. In contrast, chmod ignores symbolic links encountered during recursive directory traversals." linux.die.net/man/1/chmod

    – Rinzwind
    Jun 15 at 11:35











  • Thanks. Now i got it. How i understand on MacOS you can change the symbolic link permissions, is that right?

    – ph7
    Jun 15 at 11:39











  • yes more generic: on freebsd/openbsd you can (mac os uses openbsd). Those are UNIX clones so not Linux and UNIX has a couple of features in commands we never got in Linux).

    – Rinzwind
    Jun 15 at 11:50












  • Clear! Thanks @Rinzwind

    – ph7
    Jun 15 at 11:57

















1















I am trying to change the permissions for the symbolic link.



Making directory and symbolic link



As how you can see in the image, the soft link has 777 permissions, but i would like to change that.



I tried to change that by:




  1. chmod 755 someLink - but this changes linked directory (someDir) permission.


  2. chmod -h 755 someLink - this brings eroor chmod: invalid option --'h'

Is there a way how to change symbolic link permissions? I am on Ubuntu 18.04



Many thanks in advance










share|improve this question









New contributor



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














  • 2





    -h is freebsd/openbsd so MacOS. Not Linux ;-) freebsd.org/cgi/man.cgi?query=chmod&manpath=SuSE+Linux/… Linux "chmod never changes the permissions of symbolic links; the chmod system call cannot change their permissions. This is not a problem since the permissions of symbolic links are never used. However, for each symbolic link listed on the command line, chmod changes the permissions of the pointed-to file. In contrast, chmod ignores symbolic links encountered during recursive directory traversals." linux.die.net/man/1/chmod

    – Rinzwind
    Jun 15 at 11:35











  • Thanks. Now i got it. How i understand on MacOS you can change the symbolic link permissions, is that right?

    – ph7
    Jun 15 at 11:39











  • yes more generic: on freebsd/openbsd you can (mac os uses openbsd). Those are UNIX clones so not Linux and UNIX has a couple of features in commands we never got in Linux).

    – Rinzwind
    Jun 15 at 11:50












  • Clear! Thanks @Rinzwind

    – ph7
    Jun 15 at 11:57













1












1








1








I am trying to change the permissions for the symbolic link.



Making directory and symbolic link



As how you can see in the image, the soft link has 777 permissions, but i would like to change that.



I tried to change that by:




  1. chmod 755 someLink - but this changes linked directory (someDir) permission.


  2. chmod -h 755 someLink - this brings eroor chmod: invalid option --'h'

Is there a way how to change symbolic link permissions? I am on Ubuntu 18.04



Many thanks in advance










share|improve this question









New contributor



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











I am trying to change the permissions for the symbolic link.



Making directory and symbolic link



As how you can see in the image, the soft link has 777 permissions, but i would like to change that.



I tried to change that by:




  1. chmod 755 someLink - but this changes linked directory (someDir) permission.


  2. chmod -h 755 someLink - this brings eroor chmod: invalid option --'h'

Is there a way how to change symbolic link permissions? I am on Ubuntu 18.04



Many thanks in advance







command-line permissions directory symbolic-link






share|improve this question









New contributor



ph7 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



ph7 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 Jun 15 at 13:00









guntbert

9,71713 gold badges32 silver badges73 bronze badges




9,71713 gold badges32 silver badges73 bronze badges






New contributor



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








asked Jun 15 at 11:05









ph7ph7

102 bronze badges




102 bronze badges




New contributor



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




New contributor




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









  • 2





    -h is freebsd/openbsd so MacOS. Not Linux ;-) freebsd.org/cgi/man.cgi?query=chmod&manpath=SuSE+Linux/… Linux "chmod never changes the permissions of symbolic links; the chmod system call cannot change their permissions. This is not a problem since the permissions of symbolic links are never used. However, for each symbolic link listed on the command line, chmod changes the permissions of the pointed-to file. In contrast, chmod ignores symbolic links encountered during recursive directory traversals." linux.die.net/man/1/chmod

    – Rinzwind
    Jun 15 at 11:35











  • Thanks. Now i got it. How i understand on MacOS you can change the symbolic link permissions, is that right?

    – ph7
    Jun 15 at 11:39











  • yes more generic: on freebsd/openbsd you can (mac os uses openbsd). Those are UNIX clones so not Linux and UNIX has a couple of features in commands we never got in Linux).

    – Rinzwind
    Jun 15 at 11:50












  • Clear! Thanks @Rinzwind

    – ph7
    Jun 15 at 11:57












  • 2





    -h is freebsd/openbsd so MacOS. Not Linux ;-) freebsd.org/cgi/man.cgi?query=chmod&manpath=SuSE+Linux/… Linux "chmod never changes the permissions of symbolic links; the chmod system call cannot change their permissions. This is not a problem since the permissions of symbolic links are never used. However, for each symbolic link listed on the command line, chmod changes the permissions of the pointed-to file. In contrast, chmod ignores symbolic links encountered during recursive directory traversals." linux.die.net/man/1/chmod

    – Rinzwind
    Jun 15 at 11:35











  • Thanks. Now i got it. How i understand on MacOS you can change the symbolic link permissions, is that right?

    – ph7
    Jun 15 at 11:39











  • yes more generic: on freebsd/openbsd you can (mac os uses openbsd). Those are UNIX clones so not Linux and UNIX has a couple of features in commands we never got in Linux).

    – Rinzwind
    Jun 15 at 11:50












  • Clear! Thanks @Rinzwind

    – ph7
    Jun 15 at 11:57







2




2





-h is freebsd/openbsd so MacOS. Not Linux ;-) freebsd.org/cgi/man.cgi?query=chmod&manpath=SuSE+Linux/… Linux "chmod never changes the permissions of symbolic links; the chmod system call cannot change their permissions. This is not a problem since the permissions of symbolic links are never used. However, for each symbolic link listed on the command line, chmod changes the permissions of the pointed-to file. In contrast, chmod ignores symbolic links encountered during recursive directory traversals." linux.die.net/man/1/chmod

– Rinzwind
Jun 15 at 11:35





-h is freebsd/openbsd so MacOS. Not Linux ;-) freebsd.org/cgi/man.cgi?query=chmod&manpath=SuSE+Linux/… Linux "chmod never changes the permissions of symbolic links; the chmod system call cannot change their permissions. This is not a problem since the permissions of symbolic links are never used. However, for each symbolic link listed on the command line, chmod changes the permissions of the pointed-to file. In contrast, chmod ignores symbolic links encountered during recursive directory traversals." linux.die.net/man/1/chmod

– Rinzwind
Jun 15 at 11:35













Thanks. Now i got it. How i understand on MacOS you can change the symbolic link permissions, is that right?

– ph7
Jun 15 at 11:39





Thanks. Now i got it. How i understand on MacOS you can change the symbolic link permissions, is that right?

– ph7
Jun 15 at 11:39













yes more generic: on freebsd/openbsd you can (mac os uses openbsd). Those are UNIX clones so not Linux and UNIX has a couple of features in commands we never got in Linux).

– Rinzwind
Jun 15 at 11:50






yes more generic: on freebsd/openbsd you can (mac os uses openbsd). Those are UNIX clones so not Linux and UNIX has a couple of features in commands we never got in Linux).

– Rinzwind
Jun 15 at 11:50














Clear! Thanks @Rinzwind

– ph7
Jun 15 at 11:57





Clear! Thanks @Rinzwind

– ph7
Jun 15 at 11:57










1 Answer
1






active

oldest

votes


















2














While not an exact duplicate, this answer should provide a hint:



$ ls -l
total 0
-rw-r--r-- 1 vidarlo users 0 May 21 19:10 a
lrwxrwxrwx 1 vidarlo users 1 May 21 19:10 b -> a
$ chmod 755 b
$ ls -la
-rwxr-xr-x 1 vidarlo users 0 May 21 19:10 a
lrwxrwxrwx 1 vidarlo users 1 May 21 19:10 b -> a


In short: symlinks does not have permissions. Anyone can read where the symlink points to. The permissions of the target determines the access.



As Rinzwind points out, the -h flag is for *BSD versions of chmod. It does not work on GNU versions of chmod.






share|improve this answer



























    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
    );



    );






    ph7 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%2f1151269%2fis-it-possible-to-change-the-permissions-for-the-symbolic-link%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









    2














    While not an exact duplicate, this answer should provide a hint:



    $ ls -l
    total 0
    -rw-r--r-- 1 vidarlo users 0 May 21 19:10 a
    lrwxrwxrwx 1 vidarlo users 1 May 21 19:10 b -> a
    $ chmod 755 b
    $ ls -la
    -rwxr-xr-x 1 vidarlo users 0 May 21 19:10 a
    lrwxrwxrwx 1 vidarlo users 1 May 21 19:10 b -> a


    In short: symlinks does not have permissions. Anyone can read where the symlink points to. The permissions of the target determines the access.



    As Rinzwind points out, the -h flag is for *BSD versions of chmod. It does not work on GNU versions of chmod.






    share|improve this answer





























      2














      While not an exact duplicate, this answer should provide a hint:



      $ ls -l
      total 0
      -rw-r--r-- 1 vidarlo users 0 May 21 19:10 a
      lrwxrwxrwx 1 vidarlo users 1 May 21 19:10 b -> a
      $ chmod 755 b
      $ ls -la
      -rwxr-xr-x 1 vidarlo users 0 May 21 19:10 a
      lrwxrwxrwx 1 vidarlo users 1 May 21 19:10 b -> a


      In short: symlinks does not have permissions. Anyone can read where the symlink points to. The permissions of the target determines the access.



      As Rinzwind points out, the -h flag is for *BSD versions of chmod. It does not work on GNU versions of chmod.






      share|improve this answer



























        2












        2








        2







        While not an exact duplicate, this answer should provide a hint:



        $ ls -l
        total 0
        -rw-r--r-- 1 vidarlo users 0 May 21 19:10 a
        lrwxrwxrwx 1 vidarlo users 1 May 21 19:10 b -> a
        $ chmod 755 b
        $ ls -la
        -rwxr-xr-x 1 vidarlo users 0 May 21 19:10 a
        lrwxrwxrwx 1 vidarlo users 1 May 21 19:10 b -> a


        In short: symlinks does not have permissions. Anyone can read where the symlink points to. The permissions of the target determines the access.



        As Rinzwind points out, the -h flag is for *BSD versions of chmod. It does not work on GNU versions of chmod.






        share|improve this answer















        While not an exact duplicate, this answer should provide a hint:



        $ ls -l
        total 0
        -rw-r--r-- 1 vidarlo users 0 May 21 19:10 a
        lrwxrwxrwx 1 vidarlo users 1 May 21 19:10 b -> a
        $ chmod 755 b
        $ ls -la
        -rwxr-xr-x 1 vidarlo users 0 May 21 19:10 a
        lrwxrwxrwx 1 vidarlo users 1 May 21 19:10 b -> a


        In short: symlinks does not have permissions. Anyone can read where the symlink points to. The permissions of the target determines the access.



        As Rinzwind points out, the -h flag is for *BSD versions of chmod. It does not work on GNU versions of chmod.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Jun 15 at 11:57

























        answered Jun 15 at 11:28









        vidarlovidarlo

        12k5 gold badges31 silver badges55 bronze badges




        12k5 gold badges31 silver badges55 bronze badges




















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









            draft saved

            draft discarded


















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












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











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




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1151269%2fis-it-possible-to-change-the-permissions-for-the-symbolic-link%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

            Get product attribute by attribute group code in magento 2get product attribute by product attribute group in magento 2Magento 2 Log Bundle Product Data in List Page?How to get all product attribute of a attribute group of Default attribute set?Magento 2.1 Create a filter in the product grid by new attributeMagento 2 : Get Product Attribute values By GroupMagento 2 How to get all existing values for one attributeMagento 2 get custom attribute of a single product inside a pluginMagento 2.3 How to get all the Multi Source Inventory (MSI) locations collection in custom module?Magento2: how to develop rest API to get new productsGet product attribute by attribute group code ( [attribute_group_code] ) in magento 2

            Category:9 (number) SubcategoriesMedia in category "9 (number)"Navigation menuUpload mediaGND ID: 4485639-8Library of Congress authority ID: sh85091979ReasonatorScholiaStatistics

            Magento 2.3: How do i solve this, Not registered handle, on custom form?How can i rewrite TierPrice Block in Magento2magento 2 captcha not rendering if I override layout xmlmain.CRITICAL: Plugin class doesn't existMagento 2 : Problem while adding custom button order view page?Magento 2.2.5: Overriding Admin Controller sales/orderMagento 2.2.5: Add, Update and Delete existing products Custom OptionsMagento 2.3 : File Upload issue in UI Component FormMagento2 Not registered handleHow to configured Form Builder Js in my custom magento 2.3.0 module?Magento 2.3. How to create image upload field in an admin form