emilyk
Posts: 3
Joined: Thu May 26, 2016 12:42 pm

error writing etc/hostapd/hostpad.conf\; no such file or dir

Thu May 26, 2016 12:53 pm

hello all,
i'm newbie for pi user.
I want to set up my pi as wireless access point.
i'm following steps from the instructions .

I'm currently creating this file.

interface=wlan0
driver=....
ssid=...
hw_
....
...etc..
etc...
...

after I type these commands and I want to save it.
I chose Y for yes .
and after exit, this message comes up.
[ Error writing etc/hostapd/hostapd.conf: No such file or directory ]

I checked the folder in /etc ... there is folder for hostapd .
I rebooted the machine, but I tried again, it still shows same error.
I searched the solutions on the internet , I couldn't find any so far.
Could anyone help me out if possible ?
thanks very much.

SkyRise
Posts: 179
Joined: Tue Jan 24, 2012 1:20 pm

Re: error writing etc/hostapd/hostpad.conf\; no such file or

Thu May 26, 2016 1:06 pm

The path should start with a leading '/':

Code: Select all

/etc/hostapd/hostapd.conf
Also, you will need to use sudo to edit that file as it will be owned by root.

emilyk
Posts: 3
Joined: Thu May 26, 2016 12:42 pm

Re: error writing etc/hostapd/hostpad.conf\; no such file or

Thu May 26, 2016 1:14 pm

thanks so much.
it did work.
I miss " / " in front of etc ...
I don't know Linux . so , I didn't know much about it .
thanks a lot :D

SkyRise
Posts: 179
Joined: Tue Jan 24, 2012 1:20 pm

Re: error writing etc/hostapd/hostpad.conf\; no such file or

Thu May 26, 2016 1:19 pm

No problem.
For info,when you log in to linux, you normally go to the users home directory, '/home/pi' in this case

Running a command without the leading '/' will assume you're looking for something under your current directory, in this case '/home/pi/etc/hostapd/hostpad.conf', which is obviously wrong.

By putting the leading '/', you are telling the shell to start right at the top of the filesystem.

Good luck, and enjoy ;)

emilyk
Posts: 3
Joined: Thu May 26, 2016 12:42 pm

Re: error writing etc/hostapd/hostpad.conf\; no such file or

Thu May 26, 2016 2:07 pm

I got one more error ....
I have save the file for hostapd.conf
the commands in the file are:

interface=wlan0
driver=rtl871xdrv
ssid=PI
hw_mode=g
channel=6
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=Raspberry
wpa_pairwise=TKP
wpa_pairwise=CCMP



and the problem is when I type:

root@raspberrypi:/home/pi# /usr/sbin/hostapd /etc/hostapd/hostapd.conf
configuration file: /etc/hostapd/hostapd.conf
drv->ifindex=3
l2_sock_recv==l2_sock_xmi=0x0x79638
IOCtl[SIOCSIWMODE]: Invalid argument
Could not set interface to mode(3)!
Could not set interface to master mode!
rtl871drv driver initialization failed.

Could you help me out with this error ? i'm using Wi-Pi dongle. when I typed lsusb , it shows
rt5370 wireless adapter.

epoch1970
Posts: 5132
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: error writing etc/hostapd/hostpad.conf\; no such file or

Thu May 26, 2016 4:24 pm

I would try "sudo /usr/sbin/hostapd /etc/hostapd/hostapd.conf"
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

Return to “Troubleshooting”