On 12 September 2022 11:23:49 AM UTC, Tim Woodall <debianu...@woodall.me.uk>
wrote:
>On Mon, 12 Sep 2022, Greg Wooledge wrote:
>
>> On Mon, Sep 12, 2022 at 06:37:47AM +0000, jindam, vani wrote:
>>> how do i stop apt downloads if i dont
>>> use sudo. for ex:
>>> $ apt install reportbug
>>
>> Since you posted your sample command with a $ as the shell prompt, we
>> assume that you are running the command as a non-root user. That's what
>> the $ prompt traditionally means.
>>
>> That command, run as a non-root user, will stop on its own, very quickly,
>> once it tries to do things it's not permitted to do.
>>
>> unicorn:~$ time apt install reportbug
>> E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13:
>> Permission denied)
>> E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend),
>> are you root?
>> real 0.053 user 0.020 sys 0.000
>>
>>
>If the OP is complaining about:
>
>$ apt download reportbug
>Get:1 http://ftp.uk.debian.org/debian buster/main i386 reportbug all
>7.5.3~deb10u1 [128 kB]
>Fetched 128 kB in 0s (642 kB/s)
>$
yes
>Then there's no way to stop this other than making apt executable only
>by root.
thats scary, i dont want to meddle with
default permissions.
thanks for understanding my issue
regards,
jindam, vani
And even then wget will allow the same thing.
>
>Look into restricted shells or chroots if you want to restrict ordinary
>users from doing certain things. Or quotas if it's, for example, a user
>downloading lots of packages and not cleaning up.
>
>Tim
>