File deletion help

Hi, I’m trying delete some files from my Vero4k via Putty and it gives me a permission denied error. I am not a linux expert at all.

The file I want to delete is in /usr/bin and when I go ls -la to we the permissions, this file has full rwx permissions across the board.

Why would it be that I can’t delete this file? It belongs to an add-on that I have deleted (and will re-install, but that’s another story) so it’s not in use.

The only thing I see is that all the files say “root root” next to the permissions, but this one says “osmc osmc”.

Generally, you shouldn’t be installing user add-ons into /usr/bin in the first place. It is also preferably to use the package uninstall option, assuming one exists. This will properly clear up the files and undo any configuration changes that have been made during the installation.

That said, since you are where you are, you must have (directly or indirectly) used sudo to install the file to /usr/bin in the first place. So to delete it, you also need to use sudo, so therefore sudo rm /usr/bin/xxxxx.

The issue is that, although osmc is the owner of the file, osmc doesn’t have write/delete permission to the /usr/bin directory.

1 Like