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;
I am trying to change the permissions for the 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:
chmod 755 someLink
- but this changes linked directory (someDir) permission.chmod -h 755 someLink
- this brings eroorchmod: 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
New contributor
add a comment |
I am trying to change the permissions for the 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:
chmod 755 someLink
- but this changes linked directory (someDir) permission.chmod -h 755 someLink
- this brings eroorchmod: 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
New contributor
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
add a comment |
I am trying to change the permissions for the 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:
chmod 755 someLink
- but this changes linked directory (someDir) permission.chmod -h 755 someLink
- this brings eroorchmod: 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
New contributor
I am trying to change the permissions for the 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:
chmod 755 someLink
- but this changes linked directory (someDir) permission.chmod -h 755 someLink
- this brings eroorchmod: 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
command-line permissions directory symbolic-link
New contributor
New contributor
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
asked Jun 15 at 11:05
ph7ph7
102 bronze badges
102 bronze badges
New contributor
New contributor
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
add a comment |
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
add a comment |
1 Answer
1
active
oldest
votes
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
.
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
);
);
ph7 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%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
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
.
add a comment |
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
.
add a comment |
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
.
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
.
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
add a comment |
add a comment |
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.
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.
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%2f1151269%2fis-it-possible-to-change-the-permissions-for-the-symbolic-link%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
-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