digipup1
Posts: 55
Joined: Mon Aug 05, 2013 8:27 pm
Location: America

Failing to create a file with sudo nano

Sat Mar 14, 2015 7:02 pm

I'm trying to create a file /etc/hostapd/hostapd.conf using the command sudo nano and when I hit ^X then Yes to save changes and hit return to finish it then says "Error writing /etc/hostapd/hostapd.conf: No such file or directory" Please help I'm getting very annoyed with this.

User avatar
FTrevorGowen
Forum Moderator
Forum Moderator
Posts: 5621
Joined: Mon Mar 04, 2013 6:12 pm
Location: Bristol, U.K.
Contact: Website

Re: Failing to create a file with sudo nano

Sat Mar 14, 2015 7:07 pm

digipup1 wrote:I'm trying to create a file /etc/hostapd/hostapd.conf using the command sudo nano and when I hit ^X then Yes to save changes and hit return to finish it then says "Error writing /etc/hostapd/hostapd.conf: No such file or directory" Please help I'm getting very annoyed with this.
What happens if you try ^O (to write Out the file) first, before ^X (to eXit)? Are you sure that the /etc/hostapd directory already exists? (Use sudo mkdir to create it perhaps)
Trev.
Still running Raspbian Jessie or Stretch on some older Pi's (an A, B1, 2xB2, B+, P2B, 3xP0, P0W, 2xP3A+, P3B+, P3B, B+, and a A+) but Buster on the P4B's. See: https://www.cpmspectrepi.uk/raspberry_pi/raspiidx.htm

User avatar
xoopha
Posts: 106
Joined: Mon Feb 09, 2015 9:52 pm

Re: Failing to create a file with sudo nano

Sat Mar 14, 2015 7:08 pm

Does the /etc/hostapd directory exist to start with?

User avatar
pluggy
Posts: 3635
Joined: Thu May 31, 2012 3:52 pm
Location: Barnoldswick, Lancashire,UK
Contact: Website

Re: Failing to create a file with sudo nano

Sat Mar 14, 2015 7:08 pm

I can easily replicate the error because I don't have a directory /etc/hostapd/ on my system. It sounds like you don't have it on yours either.
Don't judge Linux by the Pi.......
I must not tread on too many sacred cows......

Return to “Troubleshooting”