Adding a file to the /www dir easily?

Discussion in 'Tomato Firmware' started by Chilling_Silence, Mar 13, 2009.

  1. Chilling_Silence

    Chilling_Silence Addicted to LI Member

    Hi all,

    Im looking to provision some SIP phones with the help of my trusty Asus WL-520gU running Tomato :)

    In a nutshell, they come from the factory looking for a file in the / dir of the DHCP Server that gave them an IP (The Tomato Router).

    All it needs to be is a 3-line txt file in /www (The root http dir, yes?) however it gives me this:
    # echo "Test" > 123.cfg
    -sh: can't create 123.cfg: Read-only file system
    Is this easy to change? The routers come looking for the file in the / dir by default so its not really easy for me to change where its looking at without defeating the purpose of using the Tomato router to do this (Because it gives out the DHCP addresses).

    Any assistance is greatly appreciated

    Kind regards

  2. mikester

    mikester Network Guru Member

    If I am understanding your question correctly, what I've done in the past is add a logical link to a CIFS share using the INIT scripts

    ln -s /cifs1 /var/wwwext

    will create a link called "ext" that you can access customized files with by using your web browser. So if I created a web page called "myfile.html" I would use


    This let me develop/modify/test tomato web pages located on my PC without having to recompile Tomato each time.

    If you want it stored locally on the tomato you could probably use JFFS2. I haven't tried it and can't say for sure.

    Keep in mind the security risks here - I did this on the LAN side only.

  3. bogderpirat

    bogderpirat Network Guru Member

    for three lines, you can save yourself the cifs and just add a
    echo "line1\nline2\nline3" > /tmp/filename.ext
    to your startup script and create a link to /tmp/filename.ext. but i don't know if that's really what he wants... if the phones really can only access the root of the dhcp server's webserver, you might have to recompile the firmware with that put in there.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice