Comments (1)
Hi,
Capabilities are not supported under WSL at this time. See my discussion here: microsoft/WSL#1303 (comment)
Regardless, the application should work properly as long as it has enough privileges to perform whatever it is trying to do, without needing to resort to capabilities. If you're running as root, you won't have problems. If you aren't, you'll have to make sure to track down what permissions it needs and to grant it accordingly, if possible.
As for the installer failing, you could use a nasty workaround. That is, compile a library with a no-op cap_set_file
function, and load it with LD_PRELOAD
.
echo -e "#include <sys/capability.h>\nint cap_set_file(const char *path_p, cap_t cap_p){return 0;}" > fakecap.c
gcc fakecap.c -shared -fPIC -o fakecap.so
Note: for sys/capability.h
you will need libcap-dev
on Debian. most likely libcap-devel
on CentOS, but I haven't tested the latter.
You can check whether the library is working by trying to use setcap
:
$ setcap CAP_NET_BIND_SERVICE=+eip test.txt
Failed to set capabilities on file `test.txt' (Operation not supported)
The value of the capability argument is not permitted for a file. Or the file is not a regular (non-symlink) file
$ LD_PRELOAD=./fakecap.so setcap CAP_NET_BIND_SERVICE=+eip test.txt; echo $?
0
As such, for yum
you'd use it with:
$ LD_PRELOAD=./fakecap.so yum install iputils
from wsl-distribution-switcher.
Related Issues (20)
- [!] Failed to fetch manifest info for cetos: HTTP Error 401: Unauthorized HOT 1
- "[!] The Linux subsystem is not installed. Please go through the standard installation procedure first." HOT 3
- Unable to find lxrun.exe in the expected locations. HOT 4
- [!] Failed to find tag 12.04 for image ubuntu.
- my_lookupdev: socket: Socket type not supported HOT 2
- WSL2 docker on centos7.6 not good
- gentoo install failed
- no such file or directory HOT 1
- `python install.py rootfs_kalilinux_kali-linux-docker_latest.tar.gz` with python 3.7 HOT 3
- bash - command not found HOT 1
- APT Key Expired and Unable to Update / Install HOT 4
- How can i install 3 different distros ?
- Instead of Centos 6 dowloading Centos 7 HOT 1
- Set default os in WSL
- With the Fall Creators update, is this dead? HOT 1
- Persistent "You do not seem to have the default distribution installed anymore."
- no lxss HOT 3
- python3 install.py rootfs_kalilinux_kali-linux-docker_ latest.tar.gz errors in files:
- get.prebuild.py fails on SSLError error [SSL: CERTIFICATE_VERIFY_FAILED]
- Unable to find lxrun.exe in the expected locations. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wsl-distribution-switcher.