Can't create Symlink

Hi,
I wanted to create a Symbol link between a Folder in Adons and my SD Card
I get everytime Operation not Permitted.

I’ve done this a few Month before with a different folder and it worked, so i don’t know why it’s not working this time.

I tried it with and without sudo

ln -s /home/osmc/.kodi/addons/script.module.hls.cache/cache /media/3620-1EFE/

What is the output of

ls -lah /home/osmc/.kodi/addons/script.module.hls.cache/
ls -lah /media/3620-1EFE

And did you stopped mediacenter before?
sudo systemctl stop mediacenter

You can’t give a link a name which already exists.

This is my Output

@grahamh I know this. If i try to symlink wich already exist.
Creating e.g the folder “/media/3620-1EFE/cache”, it gives me this output:


Wich is totally right.

But i don’t get it why i get a Operation not permitted, as mentioned before i already did a symlink once.

Well you are aware that with ln -s /home/osmc/.kodi/addons/script.module.hls.cache/cache /media/3620-1EFE/ you are pointing from /media/3620-1EFE back to /home/osmc/.kodi/addons/script.module.hls.cache/cache instead the other way around, or?

Means you are getting an operation not permitted because you are trying to change an existing mount point.

So my suggestions (assuming you want to move the cache folder on the external drive.
sudo systemctl stop mediacenter
mv /home/osmc/.kodi/addons/script.module.hls.cache/cache /media/3620-1EFE
ln -s /media/3620-1EFE/cache /home/osmc/.kodi/addons/script.module.hls.cache/cache
sudo systemctl start mediacenter

I have a folder where chache files are stored “script.module.hls.cache/cache” and wanted to outsource them to my sd card.
So if i go to “/media/3620-1EFE/cache” i’m getting actually to “/home/osmc/.kodi/addons/script.module.hls.cache/cache”

I hope this right so: ln -s /home/osmc/.kodi/addons/script.module.hls.cache/cache /media/3620-1EFE/
Or should be the other way around?

Moving wouldn’t work, cause the Path is written inside an Addon. Other option for me is to change it inside the addon.py.

Other way around, follow my suggested commands.

Ok ty i give it a go ))

What do you mean by “trying to change an existing mount point”
I’m just interested from technical point of view.

Well your Hardisk (or SD Card) is mounted at /media/3620-1EFE and you tried to use that as the Symbolic link which wouldn’t work.

Ah thank you for your explanation.
You solution worked!!!

You’re the best ))