Symbolic link but permission denied

Asked by Andy Lennox

I'm trying to create this symbolic link

Ln -s /dev/input/js0 /dev/js0

but get 'Permission Denied'

can anyone tell me how to achieve this please?

Question information

English Edit question
Ubuntu bash Edit question
No assignee Edit question
Last query:
Last reply:
Revision history for this message
wojox (wojox) said :

Try this:

ln -sf /dev/input/js0 /dev/js0

Revision history for this message
Andy Lennox (andylennox) said :

Thanks for the response wojox, but i still get the error message of 'Permission Denied'

Revision history for this message
wojox (wojox) said :

Have you tried creating your own udev rule for the joystick?

gksudo gedit /etc/udev/rules.d/60-symlinks.rules

Place this in the file:

# Create Joystick /dev/js0, /dev/js1, etc using symlink
#(links /dev/input/jsX to /dev/jsX)
KERNEL=="js[0-9]*", SYMLINK+="%k"

Save the file, exit and reboot.

Revision history for this message
Michael Wood (mwood) said :

You need root access to create a symlink in /dev, so try:

sudo ln -s /dev/input/js0 /dev/js0

Also, since the last part is the same and because the source is in a subdirectory of the destination, you can also do this:

sudo ln -s input/js0 /dev

But you might want to make it permanent. For this you will need to configure udev. See the following:

Can you help with this problem?

Provide an answer of your own, or ask Andy Lennox for more information if necessary.

To post a message you must log in.