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

Language:
English Edit question
Status:
Answered
For:
Ubuntu bash Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
wojox (wojox) said :
#1

Try this:

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

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

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

Revision history for this message
wojox (wojox) said :
#3

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 :
#4

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:

http://ubuntuforums.org/showthread.php?t=312569

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.