experchange > ubuntu

Paulo da Silva (01-10-19, 11:28 PM)
Hello!

I am getting, since a couple of weeks - may be, the following warning at
the end of every "aptitude upgrade":

W: Download is performed unsandboxed as root as file
'/var/cache/apt/archives/partial/<some package name>.deb' couldn't be
accessed by user '_apt'. - pkgAcquire::Run (13: Permissão negada)
(Permissão negada == Permission denied)

I also have a VM (Virtual Box) with kubuntu 18.04 but there is no such
warning!

So, I checked the permissions/ownership of every dir in the path
/var/cache/apt/archives/partial and compared with those in the VM and
they are the same!!

I cannot understand what is happening! Any clue?

Thanks for any help/comment.

--- - complaints: news ---
stepore (01-11-19, 06:50 AM)
On 01/10/2019 01:28 PM, Paulo da Silva wrote:
> I am getting, since a couple of weeks - may be, the following warning at
> the end of every "aptitude upgrade":


as root?
what about sudo apt or sudo apt-get, same?
What OS, which version?


> So, I checked the permissions/ownership of every dir in the path
> /var/cache/apt/archives/partial and compared with those in the VM and
> they are the same!!


And what _are_ those permissions?

> I cannot understand what is happening! Any clue?


Not yet, no.
Anssi Saari (01-11-19, 09:50 AM)
Paulo da Silva <p_s_d_a_s_i_l_v_a_ns> writes:

> Hello!
> I am getting, since a couple of weeks - may be, the following warning at
> the end of every "aptitude upgrade":
> W: Download is performed unsandboxed as root as file
> '/var/cache/apt/archives/partial/<some package name>.deb' couldn't be
> accessed by user '_apt'. - pkgAcquire::Run (13: Permissão negada)
> (Permissão negada == Permission denied)


That seems fairly clear. Apparently libapt these days likes to drop root
privileges and run as user _apt. The directory
/var/cache/apt/archives/partial and files in it should be owned by the
_apt user and have 700 perms. There are some suggestions at
Aragorn (01-11-19, 11:23 AM)
On Thu, 10 Jan 2019 20:50:56 -0800, stepore scribbled:

> On 01/10/2019 01:28 PM, Paulo da Silva wrote:
>> I am getting, since a couple of weeks - may be, the following warning
>> at the end of every "aptitude upgrade":

> as root?
> what about sudo apt or sudo apt-get, same?


When you use su or sudo, the effective UID becomes "0", i.e. root.
Richard Kettlewell (01-11-19, 12:13 PM)
Aragorn <thorongil> writes:
> On Thu, 10 Jan 2019 20:50:56 -0800, stepore scribbled:
> When you use su or sudo, the effective UID becomes "0", i.e. root.


It sets all UIDs (real, effective and saved) to 0.
stepore (01-11-19, 10:51 PM)
On 01/11/2019 01:23 AM, Aragorn wrote:
> On Thu, 10 Jan 2019 20:50:56 -0800, stepore scribbled:
> When you use su or sudo, the effective UID becomes "0", i.e. root.


I know. Sorry, what was your point? Was this for the OP or did I miss
something?
Cefyn Landeg (01-11-19, 11:19 PM)
stepore wrote:

> Subject: Re: Update warning - kubuntu 18.04
> What OS, which version?


I wonder whether that might be Kubuntu version 18.04 🤔
Paulo da Silva (01-11-19, 11:46 PM)
Às 07:50 de 11/01/19, Anssi Saari escreveu:
> Paulo da Silva <p_s_d_a_s_i_l_v_a_ns> writes:
> That seems fairly clear. Apparently libapt these days likes to drop root
> privileges and run as user _apt. The directory
> /var/cache/apt/archives/partial and files in it should be owned by the
> _apt user and have 700 perms. There are some suggestions at
>


That's why I am confused. The ownership/permissions are the same as in
my VM (same OS). In the later there is no such warning!

I remembered one thing that I changed at the time of installation: I did
a link -s from /var/cache/apt to another volume because I am short on /
partition space, but that didn't cause this problem, at least then.

Here are the ls's of the whole path:

drwxr-xr-x 14 root root 4096 jul 25 04:17 /var
drwxr-xr-x 16 root root 4096 set 2 02:07 /var/cache
lrwxrwxrwx 1 root root 31 set 2 02:07 /var/cache/apt -> /Av/var/cache/apt
drwxr-xr-x 1 root root 342 jan 11 21:10 /Av
drwxr-xr-x 1 root root 10 set 2 02:06 /Av/var
drwxr-xr-x 1 root root 6 set 2 02:06 /Av/var/cache
drwxr-xr-x 1 root root 70 jan 11 20:52 /Av/var/cache/apt
drwxr-xr-x 1 root root 1008 jan 11 06:39 /Av/var/cache/apt/archives
drwx------ 1 _apt root 0 jan 11 06:39 /Av/var/cache/apt/archives/partial

I can't see anything wrong with this!
Paulo da Silva (01-11-19, 11:48 PM)
Às 21:19 de 11/01/19, Cefyn Landeg escreveu:
> stepore wrote:
>> Subject: Re: Update warning - kubuntu 18.04
>> What OS, which version?

> I wonder whether that might be Kubuntu version 18.04  ?


Yep! How did you guess? :-)
stepore (01-12-19, 09:25 AM)
On 01/11/2019 01:19 PM, Cefyn Landeg wrote:
> stepore wrote:
>> Subject: Re: Update warning - kubuntu 18.04
>> What OS, which version?

> I wonder whether that might be Kubuntu version 18.04 🤔


You can poke fun if you wish but some people don't actually notice
details in the subject heading. The relevant bits belong in the body of
the post. I just noticed it now TBH.

No need to be a dick.
Aragorn (01-12-19, 12:34 PM)
On Fri, 11 Jan 2019 12:51:39 -0800, stepore scribbled:

> On 01/11/2019 01:23 AM, Aragorn wrote:
> I know. Sorry, what was your point? Was this for the OP or did I miss
> something?


It would appear that you did. :)

Even with Ubuntu's horrible misconception that having sudo require only
the user's own password for gaining root privileges would somehow be
safer than having a functional root account, one still always needs root
privileges to install or uninstall software.

Therefore it would be pointless to try using apt, apt-get or aptitude as
a normal user. ;)
Dan C (01-12-19, 05:09 PM)
On Fri, 11 Jan 2019 23:25:12 -0800, stepore wrote:

> On 01/11/2019 01:19 PM, Cefyn Landeg wrote:
> You can poke fun if you wish but some people don't actually notice
> details in the subject heading. The relevant bits belong in the body of
> the post. I just noticed it now TBH.


You're not the sharpest crayon in the box, are ya?

> No need to be a dick.


They weren't. Learn how to read and pay attention and folks won't seem
like "dicks" to you.
stepore (01-12-19, 10:28 PM)
On 01/12/2019 02:34 AM, Aragorn wrote:

> Therefore it would be pointless to try using apt, apt-get or aptitude as
> a normal user. ;)


I was just asking to make sure he wasn't trying to runt it as a normal
user. Which is why I mentioned as root or using sudo. Some people might
not know and it wasn't specifically stated.
Aragorn (01-13-19, 02:22 PM)
On Sat, 12 Jan 2019 12:28:31 -0800, stepore scribbled:

> On 01/12/2019 02:34 AM, Aragorn wrote:
>> Therefore it would be pointless to try using apt, apt-get or aptitude
>> as a normal user. ;)

> I was just asking to make sure he wasn't trying to runt it as a normal
> user. Which is why I mentioned as root or using sudo. Some people might
> not know and it wasn't specifically stated.


In the Many Worlds Theory, there would with the utmost certainty be a
universe in which he tried that. :p
Big Bad Bob (01-13-19, 06:42 PM)
On 01/11/19 13:46, Paulo da Silva wrote:
[..]
> drwxr-xr-x 1 root root 1008 jan 11 06:39 /Av/var/cache/apt/archives
> drwx------ 1 _apt root 0 jan 11 06:39 /Av/var/cache/apt/archives/partial
> I can't see anything wrong with this!


maybe that last one, /Av/var/cache/apt/archives/partial - owned by
'_apt' and has only owner privs on it...

Similar Threads