Error with setcap CAP_SYS_TIME+ep /user/mybinaryprogram

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Error with setcap CAP_SYS_TIME+ep /user/mybinaryprogram

ソリューションへジャンプ
3,136件の閲覧回数
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 件の賞賛
返信
1 解決策
2,805件の閲覧回数
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 件の賞賛
返信
1 返信
2,806件の閲覧回数
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 件の賞賛
返信