PERMISSION DENIED

ndoroe

Member
Feb 5, 2022
8
0
6
38
Hi
please help
im trying to open /etc/apt/sources.list and its saying permission denied whilist im using root user.
please help in new to this
1644073164982.png
 
Last edited:
Then something is really wrong.
Output of the id command is this?:
Code:
uid=0(root) gid=0(root) groups=0(root)

Whats the output of ls -la /etc/apt? Should look like this:
Code:
...
-rw-r--r--   1 root root  475 Jan  5 07:29 sources.list
...
 
Last edited:
you need to add some tools which one you want to use, like vi or nano ;)

the correct comand:

vi /etc/apt/sources.list
 
  • Like
Reactions: Dunuin
you need to add some tools which one you want to use, like vi or nano ;)

the correct comand:

vi /etc/apt/sources.list
*face palm* Didn't see that...
But without vi experience I would recommend nano. Its more noob friendly. So nano /etc/apt/sources.list and then save with CTRL+X, Y.
 
Last edited:
Then something is really wrong.
Output of the id command is this?:
Code:
uid=0(root) gid=0(root) groups=0(root)

Whats the output of ls -la /etc/apt? Should look like this:
Code:
...
-rw-r--r--   1 root root  475 Jan  5 07:29 sources.list
...
1644075091851.png
 
*face palm* Didn't see that...
But without vi experience I would recommend nano. Its more noob friendly. So nano /etc/apt/sources.list and then save with CTRL+X, Y.
Thanks very much, please help me with my main problem, i cant update, see below
1644075464623.png
 
Sounds like you setup a wrong DNS server. Put your routers IP or a public DNS server like 8.8.8.8 in /etc/resolv.conf.
 
If you can't ping 8.8.8.8 then you probably setup a wrong gateway. Check that the gateway IP in /etc/network/interfaces is really your routers IP (so I would guess 192.168.1.1).
 
Last edited:
There is your problem. You should google what a gateway is and what it does. Change it to your routers IP (for example 192.168.1.1) and then restart your networking using systemctl restart networking.
 
  • Like
Reactions: ndoroe
There is your problem. You should google what a gateway is and what it does. Change it to your routers IP (for example 192.168.1.1) and then restart your networking using systemctl restart networking.
thank you its now working
 
If you can't ping 8.8.8.8 then you probably setup a wrong gateway. Check that the gateway IP in /etc/network/interfaces is really your routers IP (so I would guess 192.168.1.1).
Unfortunately the command doesn't work on the newer Ubuntu versions. Can you help me solve the problem in Ubutu version 24?
 
Unfortunately the command doesn't work on the newer Ubuntu versions. Can you help me solve the problem in Ubutu version 24?

Based on your comment, you will be better off starting a new thread. This one was troubleshooting host networking (PVE is Debian). You are asking about (probably a VM) where you run Ubuntu with unknown context. If you need to check network setup on Ubuntu server, there would a yaml file in /etc/netplan directory. Maybe you are just looking for: ip a

Start a new thread with Ubuntu in the subject.
 
I had the same problem which is described in this thread,
but I can't solve it because the command /etc/network/interfaces don't work in versions above 18.04 in Ubuntu.
 
I had the same problem which is described in this thread,
but I can't solve it because the command /etc/network/interfaces don't work in versions above 18.04 in Ubuntu.
Same issue, different platform does not lead to the same solution. You need to make a new thread
 
  • Like
Reactions: esi_y
Same issue, different platform does not lead to the same solution. You need to make a new thread

:D I usually do not care much for organisation, but if I reply multiple threads over time I get completely confused if subject in the notifications does not correspond to the topic at hand. But there's always one more thing ... I believe for new accounts there's often higher chance of getting spam filtered as opposed to adding to existing thread.
 
  • Like
Reactions: billy999

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!