Skip to content
Advertisement

Setcap over SSHFS

I am running a VM on my machine and have mounted a host folder inside VM using sshfs (auto-mounted via fstab).

JavaScript

That folder has an executable which I want to run inside the VM. But I also need some capabilities before running that executable. So my script looks like:

JavaScript

But I am getting below error :

JavaScript

But if I copy executable inside the VM (say in /tmp/), then it works perfectly fine. Is this a known limitation of sshfs or am I missing something here ?

Advertisement

Answer

File capabilities are implemented on Linux with extended attributes (specifically the security.capability attribute), and not all filesystems implement extended attributes.

sshfs in particular does not.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement