Permission denied while creating a symbolic link
Asked Answered
C

3

5

I am installing mysql using homebrew for Mac OS X. Once the installation completes these options are given in the terminal:

To connect:
    mysql -uroot

To have launchd start mysql at login:
    ln -sfv /usr/local/opt/mysql/*.plist ~/Library/LaunchAgents
Then to load mysql now:
    launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
Or, if you don't want/need launchctl, you can just run:
    mysql.server start

So what I would like to do is have mysql started at login but when I enter the command I get permission denied like so:

$ ln -sfv /usr/local/opt/mysql/*.plist ~/Library/LaunchAgents

ln: /Users/xxxxxxxxxxxxxx/Library/LaunchAgents/homebrew.mxcl.mysql.plist: Permission denied

Any suggestions as to why this may be occuring?

Cobaltous answered 3/1, 2014 at 5:42 Comment(0)
K
8

Did you try sudo?

$ sudo ln -sfv /usr/local/opt/mysql/*.plist ~/Library/LaunchAgents
  ^^^^
Koppel answered 3/1, 2014 at 6:13 Comment(0)
M
2

I have similar issue while trying to run ln -s /Applications/ngrok ngrok. It returns permission denied. That means you need to allow Administrator to delegate a user to perform the operation. By prepending sudo will give that privilege and the system will prompt you for administrator password. sudo ln -s /Applications/ngrok ngrok

For more information on sudo.

Moffitt answered 22/8, 2019 at 14:25 Comment(0)
C
0

This happened to me on a web server where I have limited access (no sudo), so what worked for me was putting the symbolic link under /home//bin instead. I was able to install custom apps that I needed and setup them to work globally in this way. Hope this might help someone.

Casket answered 20/2, 2022 at 22:32 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.