I'm trying to change the user/group of a symbolic link with the command:
$ chown -h myuser:mygroup mysymbolic/
But it's not changing. I'm logged in as root. The current user/group is set to root:root. What went wrong?
|
I'm trying to change the user/group of a symbolic link with the command:
But it's not changing. I'm logged in as root. The current user/group is set to root:root. What went wrong? | |||
feedback
|
This question came from our site for professional and enthusiast programmers.
|
I was putting a slash in the end of target:
just removed the slash in the end and works. | |||||
|
feedback
|
|
I've tried this myself and it works for me. If you have the -h it changes the owner of the symbolic link, but if you dont then it changes the owner of the file itself and not the link. But it doesnt seem to work of the symbolic link is linked to a directory | |||
|
feedback
|
|
Is the target a file or a directory? If it is a directory then try -H (upper case H) | |||||||
feedback
|
|
Recreate that link by myuser at myuser's home, and mv this link to the target location by sudo. | ||||
|
feedback
|