What's new

Is it possible to write to /www ?

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

yelo3

Regular Contributor
I need to place a file in /www to let me configure an SSL certificate using letsencrypt.

How can I write to that folder? It says read only filesystem.
I need just to place a temporary file
 
Unfortunately that didn't help.
Since I needed to create a full path named /.well-known/acme-challange/SFGWSo-DPDQ69zPARDVATAfOUVMbEQqtSh2zaOQZqNk I created

/tmp/www/.well-known/acme-challange/SFGWSo-DPDQ69zPARDVATAfOUVMbEQqtSh2zaOQZqNk

then run the command

Code:
mount -o bind /tmp/www /www
service restart_httpd

If I request the file I get a 404
 
Thanks for your help.
I've just created a new file in /tmp/var/www

Code:
echo hello > /tmp/var/wwwext/hello

But that doesn't seem to be available when browsing http://192.168.100.1/hello
I get a red/rose screen with the message
404 Not Found
File not found.

Any idea?
 
Thanks for your help.
I've just created a new file in /tmp/var/www

Code:
echo hello > /tmp/var/wwwext/hello

But that doesn't seem to be available when browsing http://192.168.100.1/hello
I get a red/rose screen with the message
404 Not Found
File not found.

Any idea?

Same here with practically stock john's fork (AP mode with entware-ng).
 
Thanks for your help.
I've just created a new file in /tmp/var/www

Code:
echo hello > /tmp/var/wwwext/hello

But that doesn't seem to be available when browsing http://192.168.100.1/hello
I get a red/rose screen with the message
404 Not Found
File not found.

Any idea?
Sorry, my fault....that's what happens when you dash off a quick response from memory:oops:

Two other things you need to know....

- to access the file, you need to access it by http://192.168.100.1/user/filename
- it only recognizes certain file types (such as would be used by a webserver)....in this test case, try hello.html as your filename. I also know it recognizes .png (I used to use this to provide custom icons for my library sections in Plex Roku Classic)
 
No I can't, the complete path needs to be /.well-known/acme-challange/XXXXXX
I don't this I can do this...

Do you know any other free SSL certificate providers?
 
Just thinking aloud but if you were to build the firmware could you incorporate the file/folder into /www then you would be able to remap it with
mount -o bind if you needed to change it?
 
Basically:

Copy the /www content to a USB disk.
Code:
cp -a /www /mnt/sda1/newwww

Mount bind it
Code:
mount -o bind /mnt/sda1/newwww /www

Restart HTTPD.
Code:
service restart_httpd

That will make httpd use the files on the USB disk instead of the read-only flash. Once you are done with the validation process, you can just reboot the router to revert the change.

However if you need a permanent file added, you will have to build your own firmware, or deal with having to recreate your local www copy every time you upgrade to a new firmware.
 
That's what I've tried, (well I created the new folder to /tmp/www instead on the usb disk) but it doesn't work, I get 404.
Is there any guide to configure a free HTTPS certificate in asuswrt? That's what I'm trying to do.
 
That's what I've tried, (well I created the new folder to /tmp/www instead on the usb disk) but it doesn't work, I get 404.
Is there any guide to configure a free HTTPS certificate in asuswrt? That's what I'm trying to do.

if you get a 404 then you didn't properly copy the files, or didn't restart the web server the way I specified. Make sure they didn't end up in /tmp/www/www/ .
 
Hi, been trying to add a simple file the the router, so I can perform periodic speed tests of my network (from a remote PRTG server). Adding a file to wwwext works, but I need to be logged in to the router to see its contents, Is there a way I can add a file to the router so that I can see it without logging in? I have an N66U and an AC68U to choose from (both on 380.62_1)
If that file would survive a reboot even better...
Thanks!
 
Hi, been trying to add a simple file the the router, so I can perform periodic speed tests of my network (from a remote PRTG server). Adding a file to wwwext works, but I need to be logged in to the router to see its contents, Is there a way I can add a file to the router so that I can see it without logging in? I have an N66U and an AC68U to choose from (both on 380.62_1)
If that file would survive a reboot even better...
Thanks!

Why not run something like iperf?
 
because while iperf is nice as a user initiated tool, the integrated http probe of prtg is automated, giving me an overview of my network performance over time:
this graph uses /images/New_ui/networkmap/client-list.svg (the largest file I could fins in /www
It seems my network isn't as stable as I thought :(
upload_2016-10-19_12-32-50.png
 
Unauthenticated files need to be defined inside the httpd code, so no, AFAIK it's not possible without recompiling your own firmware.
 
Thanks for the replies! Guess I'll have to let go of unauthenticated files for now. Last one then: How can I persistent over reboot write to wwwext? I created a wwwext folder in /jffs/, but that is obviously not enough.. (Hope this is not a case of rtfm, cause I did...)
 
Create a services-start script to copy the content from the /jffs/ folder to the /tmp one.
 

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!

Staff online

Top