RobertCNelson / omap-image-builder

omap image builder
http://elinux.org/BeagleBoardUbuntu
MIT License
152 stars 201 forks source link

apt-get unhappy because of directory permissions #125

Closed jcwren closed 4 years ago

jcwren commented 4 years ago

When running RootStock-NG.sh, I get errors like those shown below for the following modules:

The issue appears to be that /var/cache/apt/archives/partial/ has the following permissions/ownership:

drwx------ 2 _apt root      4096 Dec 11 11:08 partial

This directory must get deleted and recreated at some point, as setting the permissions to 0x777 before running RootStock-NG.sh caused it to revert to the permissions above.

I know the last 4 are installed from the chroot.sh script. I'm unclear why libuchardet0 is throwing a warning, as it's installed with a group of other packages much earlier on that all install without error. I also don't know why the way the chroot.sh script installing them is causing problems v.s. the way any of the other packages are installed.

Error text:

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  ti-cmem-4.16.00.00-modules-4.19.79-ti-r30
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 20.3 kB of archives.
After this operation, 66.6 kB of additional disk space will be used.
Get:1 http://repos.rcn-ee.com/debian buster/main armhf ti-cmem-4.16.00.00-modules-4.19.79-ti-r30 armhf 1buster [20.3 kB]
Fetched 20.3 kB in 0s (139 kB/s)
Selecting previously unselected package ti-cmem-4.16.00.00-modules-4.19.79-ti-r30.
(Reading database ... 39759 files and directories currently installed.)
Preparing to unpack .../ti-cmem-4.16.00.00-modules-4.19.79-ti-r30_1buster_armhf.deb ...
Unpacking ti-cmem-4.16.00.00-modules-4.19.79-ti-r30 (1buster) ...
Setting up ti-cmem-4.16.00.00-modules-4.19.79-ti-r30 (1buster) ...
W: Download is performed unsandboxed as root as file '/var/cache/apt/archives/partial/ti-cmem-4.16.00.00-modules-4.19.79-ti-r30_1buster_armhf.deb' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)
RobertCNelson commented 4 years ago

Duplicate: https://github.com/RobertCNelson/omap-image-builder/issues/108

It's just a warning in apt, we are running the chroot as "root" but apt wants to be run as sandboxed "_apt" user.. yeah, don't worry about it..

Closing, it's a "feature"/bug/warning in apt.. Regards,