[SOLVED] sources.list permissions

Kernels & Hardware, configuring network, installing services

[SOLVED] sources.list permissions

Postby Lamios » 2018-01-07 22:18

Hello,

I've a problem with my sources. When I used 'aptitude update' I got some errors with the cdrom source and thought to comment it out. Thus I did so via 'nano /etc/apt/sources.list'. Afterwards I used 'aptitude update' as root. Now I am running into some permission problems while using 'aptitude update' as user:
Code: Select all
W: chmod 0700 of directory /var/lib/apt/lists/partial failed - SetupAPTPartialDirectory (1: Operation not permitted)
E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
E: Unable to lock directory /var/lib/apt/lists/

It would be great, if anybody could tell me how I can solve this permission problem.
Thank you!
Last edited by Lamios on 2018-01-08 13:32, edited 1 time in total.
Lamios
 
Posts: 37
Joined: 2017-12-09 23:26

Re: sources.list permissions

Postby Bulkley » 2018-01-07 22:52

Show us your
Code: Select all
/etc/apt/sources.list
Bulkley
 
Posts: 5617
Joined: 2006-02-11 18:35

Re: sources.list permissions

Postby GarryRicketson » 2018-01-08 00:01

Afterwards I used 'aptitude update' as root. Now I am running into some permission problems while using 'aptitude update' as user:

As far as I know that is normal, it was any way, on older versions of Debian,
one all ways need to be root to run 'aptitude', 'apt-get', and even synaptic, one needs to run as root.
You don't mention which version of Debian, so I assume it is Debian 9, they might have changed that, but I doubt it.
You also need to be root when you edit the /etc/apt/sources.list, if you like the "Ubuntu" way, you can use sudo, but will need to install it. On Debian 8, sudo
is not installed by default, I am not sure on Debian 9.

Have you looked at any of the informative documentation for Debian, and aptitude, package management, etc . ?
https://wiki.debian.org/Aptitude
========================
https://wiki.debian.org/SourcesList
===========================
https://wiki.debian.org/sudo
User avatar
GarryRicketson
 
Posts: 5047
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: sources.list permissions

Postby debiman » 2018-01-08 06:51

just to clarify:
most aptitude/apt/apt-get actions require elevated privileges, but not all (a search does not).

so how are things when you do them like this:
Code: Select all
su
apt update
???
User avatar
debiman
 
Posts: 2809
Joined: 2013-03-12 07:18

Re: sources.list permissions

Postby Lamios » 2018-01-08 10:00

You are totally right. Of cause I have to use root for aptitude in this case (I don't know why I did not think about that yesterday, sorry). Now it works. Sorry for this troubles of my own doing and thanks for your help!
And thanks for the links, they are helpful. I am running Debian 9 and always used su for root privileges...

By looking at the output from aptitude update, it still seems to ignore one of my entries in sources.list:
Code: Select all
Ign http://ftp.de.debian.org/debian stretch InRelease
Hit http://security.debian.org/debian-security stretch/updates InRelease
Hit http://ftp.de.debian.org/debian stretch-updates InRelease
Hit http://ftp.de.debian.org/debian stretch Release


The sources.list looks as follows:
Code: Select all
#
# deb cdrom:[Debian GNU/Linux 9.1.0 _Stretch_ - Official amd64 DVD Binary-1 20170722-11:31]/ stretch contrib main

# deb cdrom:[Debian GNU/Linux 9.1.0 _Stretch_ - Official amd64 DVD Binary-1 20170722-11:31]/ stretch contrib main

deb http://ftp.de.debian.org/debian/ stretch main non-free contrib
deb-src http://ftp.de.debian.org/debian/ stretch main non-free contrib

deb http://security.debian.org/debian-security stretch/updates main contrib non-free
deb-src http://security.debian.org/debian-security stretch/updates main contrib non-free

# stretch-updates, previously known as 'volatile'
deb http://ftp.de.debian.org/debian/ stretch-updates main contrib non-free
deb-src http://ftp.de.debian.org/debian/ stretch-updates main contrib non-free
Lamios
 
Posts: 37
Joined: 2017-12-09 23:26

Re: sources.list permissions

Postby 4D696B65 » 2018-01-08 10:35

Lamios wrote:By looking at the output from aptitude update, it still seems to ignore one of my entries in sources.list:
Code: Select all
Ign http://ftp.de.debian.org/debian stretch InRelease
Hit http://security.debian.org/debian-security stretch/updates InRelease
Hit http://ftp.de.debian.org/debian stretch-updates InRelease
Hit http://ftp.de.debian.org/debian stretch Release

Hit means there is a change in the index and apt will download it.
Ign means that the index timestamp has not changed since you last checked and does not need to be downloaded.
User avatar
4D696B65
 
Posts: 2197
Joined: 2009-06-28 06:09

Re: sources.list permissions

Postby Lamios » 2018-01-08 13:32

0k. Thanks for explaining the abbreviations and helping!
Lamios
 
Posts: 37
Joined: 2017-12-09 23:26

Re: [SOLVED] sources.list permissions

Postby debiman » 2018-01-10 07:12

so, is everything good now?
you might want to mark your thread [SOLVED] (edit the title of the first post).
User avatar
debiman
 
Posts: 2809
Joined: 2013-03-12 07:18


Return to System configuration

Who is online

Users browsing this forum: No registered users and 3 guests

fashionable