Yocto:更改 /usr /lib的所有权
如何更改/usr/lib
目录的所有权以及特定用户内部的所有库?
我试图在没有成功的情况下编写自定义BB食谱。
SUMMARY = "Change /usr/lib ownership."
LICENSE = "MIT"
FILES_${PN} = "${libdir}\*"
do_install () {
chown user1:group1 ${D}${libdir}
}
我还尝试使用$ {libdir}
而不是/usr/lib
,但没有成功。如何正确访问/usr/lib
?
How can I change ownership of the /usr/lib
directory and all libraries inside for a specific user?
I tried to write a custom bb recipe without success.
SUMMARY = "Change /usr/lib ownership."
LICENSE = "MIT"
FILES_${PN} = "${libdir}\*"
do_install () {
chown user1:group1 ${D}${libdir}
}
I also tried to use ${libdir}
instead of /usr/lib
, but without success. How can I access correctly /usr/lib
?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在YOCTO编译期间,不可能更改它,因为文件系统是在过程结束时构建的。有两种实现它的方法。首先是在系统图像安装脚本中添加 chmod 。
第二个是准备系统服务和bash脚本,该脚本可以检查所有者并在必要时设置当前的脚本。
所有者updater.service
更新所有者
It's impossible to change it during yocto compilation because the filesystem is built at the end of the process. There are two ways to achieve it. The first is to add chmod in the system image installation script.
The second one is to prepare a system service and bash script, which can check the owner and set the current one if necessary.
owner-updater.service
update-owner