Results 1 to 7 of 7

Thread: some problems with ftp/samba/hdd

  1. #1
    Join Date
    Jun 2007
    Location
    Braga / Portugal
    Posts
    12

    some problems with ftp/samba/hdd

    I tried configure ftp and samba using the web interface, but didn't work.
    So I tried configure with ssh access.
    Now samba is working, but if I disable ftp server in the web interface I can't mount the usb hdd. How can I solve this?

    I also tried install vsftpd to configure a ftp server, but when I execute the "ipkg install" comand I get this error:

    Code:
    [admin@router /]$ ipkg install vsftpd                                 
    Installing vsftpd (2.0.1-7) to root...
    Downloading http://ipkg.nslu2-linux.org/feeds/unslung/wl500g/vsftpd_2.0.1-7_mipsel.ipk
    Configuring vsftpd
    You'll need to add line like
    echo "ftp stream tcp nowait root /opt/sbin/vsftpd /opt/etc/vsftpd.conf" >>/etc/inetd.conf
    to your /unslung/rc.xinetd file -- see the wiki at http://www.nslu2-linux.org for more info
    mkdir: Cannot create directory `/usr/share/': Read-only file system
    Successfully terminated.
    Any suggestion to solve this?

    Maybe I could use stupid-ftpd but it also doesn't work.

    Code:
    [admin@router /]$ stupid-ftpd      
    Cannot find /tmp/stupid-ftpd.conf.
    Make sure it's available.
    Any help

    (sorry by bad english)
    Last edited by Rui_Carlos; 09-06-2007 at 17:28.

  2. #2
    Join Date
    Mar 2007
    Location
    Budapest / Hungary
    Posts
    79
    Hi. Sorry my english.

    You can use stupid-ftpd, if you edit stupid-ftpd.conf file (/opt/etc/stupid-ftpd.conf) Look google: "stupid-ftpd.conf" for info to edit this file.
    Use your conf file: stupid-ftpd -f /opt/etc/stupid-ftpd.conf

    But vsftpd a better (if you expert)

    George

  3. #3
    Quote Originally Posted by Rui_Carlos View Post
    I tried configure ftp and samba using the web interface, but didn't work.
    So I tried configure with ssh access.
    Now samba is working, but if I disable ftp server in the web interface I can't mount the usb hdd. How can I solve this?

    I also tried install vsftpd to configure a ftp server, but when I execute the "ipkg install" comand I get this error:

    Code:
    [admin@router /]$ ipkg install vsftpd                                 
    Installing vsftpd (2.0.1-7) to root...
    Downloading http://ipkg.nslu2-linux.org/feeds/unslung/wl500g/vsftpd_2.0.1-7_mipsel.ipk
    Configuring vsftpd
    You'll need to add line like
    echo "ftp stream tcp nowait root /opt/sbin/vsftpd /opt/etc/vsftpd.conf" >>/etc/inetd.conf
    to your /unslung/rc.xinetd file -- see the wiki at http://www.nslu2-linux.org for more info
    mkdir: Cannot create directory `/usr/share/': Read-only file system
    Successfully terminated.
    Any suggestion to solve this?

    Maybe I could use stupid-ftpd but it also doesn't work.

    Code:
    [admin@router /]$ stupid-ftpd      
    Cannot find /tmp/stupid-ftpd.conf.
    Make sure it's available.
    Any help

    (sorry by bad english)
    1) "Cannot create directory `/usr/share/': Read-only file system" - your usb disk mounted as ready-only. It means that your USB-HDD (or flash or whatever) have NTFS file system and router cannot mount it as read-write. Mountig in RW mode filesystem with your data in router is not very good idea, because of complexity of file handling under ext3 file systems.

    2) Stupid-ftp is beeing enabled through web-interface. USB Application -> Ftp Server

    3) As for myself, I found the best way to solve my problem with home_ftp_server is to have my usb-disk partitioned like this:
    -first primary partition ext3, about 10 Gb
    -second primary partition ntfs. system mounts it as readonly, so I don't worry about any data loss while disk is under BusyBox Linux of router.

    I suggest you to search the forum about how to install and configure router from the scratch.

  4. #4
    Join Date
    Jun 2007
    Location
    Braga / Portugal
    Posts
    12
    Quote Originally Posted by cps View Post
    1) "Cannot create directory `/usr/share/': Read-only file system" - your usb disk mounted as ready-only. It means that your USB-HDD (or flash or whatever) have NTFS file system and router cannot mount it as read-write. Mountig in RW mode filesystem with your data in router is not very good idea, because of complexity of file handling under ext3 file systems.
    No, the filesystem is ext3. The directory '/usr' is not in usb hdd.


    Quote Originally Posted by cps View Post
    2) Stupid-ftp is beeing enabled through web-interface. USB Application -> Ftp Server
    I tried use the web interface, but it doesn't work. Now I made the file 'stupid-ftpd.conf' and a S**stupid-ftpd manualy and the server is working.


    I still don't understand why if I disable the ftp server in the web interface I can't mount the usb hdd.



    thanks for your help.

  5. #5
    Quote Originally Posted by Rui_Carlos View Post
    No, the filesystem is ext3. The directory '/usr' is not in usb hdd.

    I tried use the web interface, but it doesn't work. Now I made the file 'stupid-ftpd.conf' and a S**stupid-ftpd manualy and the server is working.

    I still don't understand why if I disable the ftp server in the web interface I can't mount the usb hdd.

    thanks for your help.
    Well, the main problem with stupid-ftpd is that its been really stupid. If you disable all of usb_applications in web-interface, then automount procedure will not work and you have to mount disks manually.

    There are 4 commands that you should add to /usr/local/sbin/post-boot (if this file is not exist then create it)to enable your disk for mounting:
    #!/bin/sh
    insmod scsi_mod
    insmod sd_mod
    insmod usb-storage

    After that you should create or update /usr/local/sbin/post-mount. Here is mine:
    #!/bin/sh
    mount -o remount,sync,rw,noatime /tmp/harddisk/
    mount -o bind /tmp/harddisk/opt /opt
    mount -o bind /tmp/harddisk/part1 /opt/ftp/stuff
    sleep 1
    /opt/sbin/vsftpd /opt/etc/vsftpd.conf

    And update create or update /usr/local/sbin/post-firewall. Mine is like this:
    #!/bin/sh
    iptables -D INPUT -j DROP
    iptables -A INPUT -p tcp --dport 21 -j ACCEPT
    iptables -A INPUT -j DROP

    Make all these files executable by entering:
    chmod +x /usr/local/sbin/*

    Next step is to save all these files in /usr/local/sbin/ . For this you should enter 3 commands:
    flashfs save
    flashfs commit
    flashfs enable

    You could search forum for more detailed information, because it's just the beginning. Good luck.
    Last edited by cps; 11-06-2007 at 07:55.

  6. #6
    Join Date
    Jun 2007
    Location
    Braga / Portugal
    Posts
    12
    Where should I mount the usb-hdd, at '/tmp/harddisk' or '/opt' ?
    (now, it is mount at '/opt')

  7. #7
    Quote Originally Posted by Rui_Carlos View Post
    Where should I mount the usb-hdd, at '/tmp/harddisk' or '/opt' ?
    (now, it is mount at '/opt')
    If you got all usb applications turned off, then you have to mount everything by your own.

    Here are my configuration files. I have turned off all usb applications (no ftp, no samba. etc).

    /usr/local/sbin/post-boot:
    ------------begin-------------
    #!/bin/sh
    insmod scsi_mod
    insmod sd_mod
    insmod usb-storage

    mkdir /tmp/harddisk
    mount /dev/discs/disc0/part1 /tmp/harddisk
    mount /tmp/harddisk/opt /opt
    mount /dev/discs/disc0/part2 /opt/ftp/stuff
    i=0
    while [ $i -le 30 ]
    do
    if [ -d /opt/etc ]
    then
    break
    fi
    sleep 1
    i='expr $i + 1'
    done

    /opt/etc/init.d/rc.unslung

    export TERMINFO="/opt/share/terminfo"
    export TERM="linux"
    ------------end-------------

    /usr/local/sbin/post-mount:
    ------------begin-------------
    #!/bin/sh
    /opt/sbin/vsftpd /opt/etc/vsftpd.conf
    ------------end-------------

    As you can see, I am mounting everything in post-boot file.

Similar Threads

  1. Connection problems with P2P Games and some other stuff :[
    By LemonsMadeMyDay in forum WL-500gP Q&A
    Replies: 0
    Last Post: 09-05-2007, 16:36
  2. mysql install problems
    By doliam in forum WL-700g Q&A
    Replies: 0
    Last Post: 02-05-2007, 17:26
  3. problems with file handling or file size
    By black_bottom in forum WL-HDD Q&A
    Replies: 1
    Last Post: 28-03-2006, 15:55
  4. Newbie Questions and problems.
    By tokyoturnip in forum WL-500g Q&A
    Replies: 2
    Last Post: 08-02-2006, 10:13
  5. msn hotmail and alot of other problems
    By dvshoaib in forum WL-500g Q&A
    Replies: 2
    Last Post: 17-10-2004, 19:49

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •