Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[SOLVED] sources.list permissions

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
Lamios
Posts: 37
Joined: 2017-12-09 23:26

[SOLVED] sources.list permissions

#1 Post by Lamios »

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.

Bulkley
Posts: 6383
Joined: 2006-02-11 18:35
Has thanked: 2 times
Been thanked: 39 times

Re: sources.list permissions

#2 Post by Bulkley »

Show us your

Code: Select all

/etc/apt/sources.list

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: sources.list permissions

#3 Post by GarryRicketson »

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
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: sources.list permissions

#4 Post by debiman »

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
???

Lamios
Posts: 37
Joined: 2017-12-09 23:26

Re: sources.list permissions

#5 Post by Lamios »

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

User avatar
4D696B65
Site admin
Site admin
Posts: 2696
Joined: 2009-06-28 06:09
Been thanked: 85 times

Re: sources.list permissions

#6 Post by 4D696B65 »

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.

Lamios
Posts: 37
Joined: 2017-12-09 23:26

Re: sources.list permissions

#7 Post by Lamios »

0k. Thanks for explaining the abbreviations and helping!

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: [SOLVED] sources.list permissions

#8 Post by debiman »

so, is everything good now?
you might want to mark your thread [SOLVED] (edit the title of the first post).

Post Reply