Search code examples
ubuntu-18.04windows-subsystem-for-linuxpermission-deniedpromelaspin

permission denied to execute '/usr/bin/spin' in WSL (ubuntu 18.04)


I have been using the Windows Subsytem for Linux for SPIN(Promela) for quite some time. However, without any changes in the setup, suddenly since 28 Oct 2019, I am getting error 'Permission denied' error for '/usr/bin/spin'. Other commands in the same location '/usr/bin/..' work just normally like earlier. I verified for clear, gcc -v, yacc -v and sudo apt install gcc.

The command location in WSL is under directory 'rootfs', which cannot be accessed using 'cd' or 'chmod'. So I do not know if it actually is a rights problem, because other commands in the same location work fine.

What is weird is that 'sudo apt install spin' says "spin is already the newest version (6.4.6+dfsg-2)." But 'spin -v' says "-bash: /usr/bin/spin: Permission denied"


Solution

  • The trivial solution given by Patrick seemed to work. ;)

    Since there was this permission denied error for the file in rootfs/usr/bin removal was also not possible. So I first manually deleted the file from the location, followed by sudo apt remove spin and then 'sudo apt install spin'.

    Now spin seems to work just fine.