Issues setting a static ip /etc/dhcpcd.conf: Permission denied

I am attempting to set a static IP on my OctoPi using SSH. I have tried following all instructions I can find from this fourm and am still having trouble. Any help would be greatly appreciated.

I have tried using /etc/dhcpcd.conf and get a denied message
I have also tried /etc/network/interfaces with no luck

I am using a PI 3B+

First off, you're not attempting to edit the /etc/dhcpcd.conf file, from the syntax you're using, you're attempting to run it.

Try instead: sudo nano /etc/dhcpcd.conf

1 Like

Thank you so much. I got to that once before but didn't go to the complete bottom. I kept seeing Sample Configuration and Example static IP and figured I must be in the wrong place. My own fault.

Would you happen to be able to direct me to a page that might explain the proper way to edit info to make my device static? Im at bit worried about messing it up.


You could have searched this forum, btw.

Try this link, noting that you might want to adjust for your own needs.

Eth0 is the hardwired network port on the pi. If you plugged a network cable between your Pi and your router, you will use eth0. If you are using wireless, it uses wlan0.

I did do a search but was unable to find the link you directed me to. I appreciate your time and I am grateful for your help. Thank you.

Thank you for the clarification. I have tried changing the values and saving the file but still end up with a IP determined with DHCP. Im sure its just something simple.

Can you clarify if you are trying to set up your Pi to use WIFI wireless or cabled ethernet. Settings are different depending on what you are trying to do.

I am using wired. My office has been assigned a group of IP addresses on a large network.

For example, it might be something like this:

interface eth0
static ip_address=
static routers=
static domain_name_servers=

Rebooting is the best way to see this work.

1 Like

Pardon me for being really basic, but you removed the # symbols at the start of each line, correct? So it should look something like:
interface eth0
static ip_address=
static routers=
static domain_name_servers=

In an office environment, there may be other rules in place for security reasons.

Your very basic question may be my problem. Thank you.

I run a production department that works beside the IT department and let them know what I was planing they gladly assigned a port in addition to a list of things they wanted printed.... This is for personal use and the IT guys really dont deal with PIs although given enough time they may be able to figure it out. I am sure thankful for the amazing people here to help me.

It's fairly difficult to explain quickly, but 10.0.0.x/24 is an invalid network, as I've described on here before. The first valid /24 network zone of is 10.0.1.x/24, believe it or not.

Careful now, I've been an "I.T. guy" since seven days after the original IBM PC came out. :laugh:

:laugh: ..... "IT Guys" are great in my book! If my user name does not give it away my label is "AV Guy". One thing we may share in common is asking the question "Is it plugged in?". Thank you for helping with my issues. I now realize growing past my basic networking skills is something I want to do. Since my existence started close to 10 years after the original IBM came out most of my time has been spent with a GUI. Dealing with issues from a command line is new to me but I quite like it.

Believe it or not, even Microsoft itself has gone GUI-less on their server product. Imagine no desktop whatsoever and a PowerShell experience from boot to shutdown. Perhaps they finally realized that from the continued success of UNIX (Linux/Ubuntu).

Speaking of "Is it plugged in?", a long time ago a fellow Teletype repairman and myself actually worked on a trouble ticket entitled "Won't operate in the O.F.F. mode". I kid you not. So I went over there, shined my "magic flashlight" on the Teletype and saved the day, discreetly turning it to the O.N. mode with my left hand.

Sorry for the delayed reply. Its been a fun work week! I cant fathom not having a desktop but after using the PI some more maybe I will get used to it!

I work with a lot of volunteers at work so the is it on question comes up way to much!