Error with setcap CAP_SYS_TIME+ep /user/mybinaryprogram

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Error with setcap CAP_SYS_TIME+ep /user/mybinaryprogram

Jump to solution
1,733 Views
sandratrujillog
Contributor III

My system: Linux t2080rdb 4.1.35-rt41 ppc64 GNU/Linux
I have obtained the linux image with Yocto Project SDK 2.0 I'm trying to use the capabilities (CAP_SYS_TIME) but when I run this command on my system, I get the following error:

setcap CAP_SYS_TIME+ep /user/mybinaryprogram

Failed to set capabilities on file '/bin/date' (Invalid argument) usage: 
setcap [-q] [-v] (-r|-|<caps>) <filename> [ ... (-r|-|<capsN>) <filenameN> ] 
Note <filename> must be a regular (non-symlink) file.

My system: Linux t2080rdb 4.1.35-rt41 ppc64 GNU/Linux
I have obtained the linux image with Yocto Project SDK 2.0

To create my image I added IMAGE_INSTALL_append = " libcap" to my configuration file.

According to the tests that I have been doing I always get the same error when trying to do a setcap.

Any suggestions?

0 Kudos
1 Solution
1,402 Views
sandratrujillog
Contributor III

I solved the problem, the command did not work because the kernel did not have the 'Security Labels' enabled.

To install these modules in the kernel I have performed the command

$ bitbake -c menuconfig virtual / kernel

and I have navigated through the menu to enable

  • Ext2 extended attributes and
  • Ext2 Security Labels

View solution in original post

0 Kudos
1 Reply
1,403 Views
sandratrujillog
Contributor III

I solved the problem, the command did not work because the kernel did not have the 'Security Labels' enabled.

To install these modules in the kernel I have performed the command

$ bitbake -c menuconfig virtual / kernel

and I have navigated through the menu to enable

  • Ext2 extended attributes and
  • Ext2 Security Labels
0 Kudos