Linux chcon: can't apply partial context to unlabeled file
34,322
Solution 1
Try to run this:
chcon -h system_u:object_r:httpd_sys_content_t /usr/lib/vmware-vcli/bin/esxcli/_ssl.so
instead of:
chcon -t textrel_shlib_t /usr/lib/vmware-vcli/bin/esxcli/_ssl.so
Solution 2
There's not quite enough context of what your goal is to answer with great accuracy, but here's some things that may help.
If you want to restore a context to a section of a directory tree: restorecon -rnv /path/to/dir
the flags are recursive, no-changes, and verbose
You can also use use chcon --reference=file_with_good_perms your_file
ls -Z --> to view selinux contexts

Author by
Alex Brodov
Updated on January 11, 2020Comments
-
Alex Brodov almost 3 years
I'm getting and error when i'm trying to run this command:
chcon -t textrel_shlib_t /usr/lib/vmware-vcli/bin/esxcli/_ssl.so
The error that i got:
chcon: can't apply partial context to unlabeled file `/usr/lib/vmware-vcli/bin/esxcli/_ssl.so'
Any idea how to solve it?