maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   Ftp server (https://talk.maemo.org/showthread.php?t=35578)

taril 2009-12-10 21:03

Re: Ftp server
 
Quote:

Originally Posted by Bratag (Post 421461)
Its a bad idea to allow anonymous logins - much better to set up an ftp user .

Ok, help me please to create a user for proftpd! Thanks!

Step by step, uhhh baby.... :D:D:D

11/(14-17)/09 2009-12-10 21:09

Re: Ftp server
 
he alread told you how to set up logins, even offered to post a perl script that he uses to generate login files.

You have to configure the /opt/etc/proftpd.conf file first. There are many guides online for how to do that.

this would be a good chance for you to flex that big thing between your ears and get your feet wet a little, look for an online guide to configure proftpd.conf, it will probably just be a matter of editing it like a text file.

taril 2009-12-10 22:11

Re: Ftp server
 
Ive got it! It was painful.

Here you are ppl:

http://ubuntuforums.org/showthread.php?t=79588

Laughing Man 2009-12-21 05:14

Re: Ftp server
 
Eesh, I've been hammering at this for a while and still can't get it to start.

The exec /home/opt/sbin/proftpd -c /opt/etc/proftpd.conf command just results in the termial closing

the /etc/event.d etc.. command doesn't even work.

/opt/sbin/proftpd.conf just reports a fatal ServerIdent: expected Boolean parameter on line 8.

I'm guessing the exec command does work. But then trying to login to the FTP via my Ubuntu Desktop just results in error connecting: connection refused.

This whole /opt situation is pretty annoying. It means what material you find in other Linux OS won't work on the N900 since everything has to be moved around.

But any help would be appreciated.

Edit: Removed ServerIdent.. now it says it's unable to determine the IP address. No valid servers configured. Error processing the /opt/etc/proftpd.conf

Edit2: now we are getting somewhere

Code:

$ /opt/sbin/proftpd
vendetta-n900 - PRIVS_ROOT: unable to seteuid(): Operation not permitted
vendetta-n900 - PRIVS_ROOT: unable to setegid(): Operation not permitted
vendetta-n900 - PRIVS_RELINQUISH: unable to seteuid(PR_ROOT_UID): Operation not permitted
vendetta-n900 - PRIVS_RELINQUISH: unable to setegid(session.gid): Operation not permitted
vendetta-n900 - PRIVS_RELINQUISH: unable to seteuid(session.uid): Operation not permitted
vendetta-n900 - mod_delay/0.6: error opening DelayTable '/opt/var/proftpd/proftpd.delay': No such file or directory
vendetta-n900 - unable to set daemon groups: Operation not permitted
vendetta-n900 - unable to set uid to 65534, current uid: 29999


DaSilva 2010-01-02 04:00

Re: Ftp server
 
I have created a startup script in /etc/init.d/proftpd

Code:

  #!/bin/sh

  # ProFTPD files
  FTPD_BIN=/opt/sbin/proftpd
  FTPD_CONF=/opt/etc/proftpd.conf
  PIDFILE=/home/opt/var/proftpd/proftpd.pid

  # If PIDFILE exists, does it point to a proftpd process?

  if [ -f $PIDFILE ]; then
  pid=`cat $PIDFILE`
  fi

  if [ ! -x $FTPD_BIN ]; then
    echo "$0: $FTPD_BIN: cannot execute"
    exit 1
  fi

  case $1 in

    start)
      if [ -n "$pid" ]; then
        echo "$0: proftpd [PID $pid] already running"
        exit
      fi

      if [ -r $FTPD_CONF ]; then
        echo "Starting proftpd..."

        $FTPD_BIN -c $FTPD_CONF
        ps -ef | pgrep -x proftpd | awk 'NR>1{exit};1' > $PIDFILE

      else
        echo "$0: cannot start proftpd -- $FTPD_CONF missing"
      fi
      ;;

    stop)
      if [ -n "$pid" ]; then
        echo "Stopping proftpd..."
        rm $PIDFILE
        kill -TERM $pid

      else
        echo "$0: proftpd not running"
        exit 1
      fi
      ;;

    restart)
      if [ -n "$pid" ]; then
        echo "Rehashing proftpd configuration"
        kill -HUP $pid

      else
        echo "$0: proftpd not running"
        exit 1
      fi
      ;;

    *)
      echo "usage: $0 {start|stop|restart}"
      exit 1
      ;;

  esac

  exit 0

and with this you can start proftpd with "/etc/init.d/proftpd start" and stop it with "/etc/init.d/proftpd stop" from the console.
To make it easier to start proftpd from the menu/desktop I created this script:

Code:

#!/bin/sh
# proftpd-toggle
if pgrep -x proftpd > /dev/null; then
sudo /etc/init.d/proftpd stop > /dev/null
else
echo Started
sudo /etc/init.d/proftpd start
fi
exit 0

The developer could integrate those two scripts and instead of the current menu entry of proftpd it could link to the toggle script.
Thanks.

chrisp7 2010-01-20 12:18

Re: Ftp server
 
How could you share the main flash drive using proftpd on the N900? (The 30Gb one) is it possible?

digitalvoid 2010-01-23 21:26

Re: Ftp server
 
I have also a working proftpd install on my device, but it's very slow in data traffic (between 80 ... 600KB/s to my 16GB). I was expecting a much faster connection...

What's your up & download speed?

DaSilva 2010-01-24 00:18

Re: Ftp server
 
Not more than 650 KB/s :(
I thought it would be faster than SCP but it is the same.

cafeine 2010-03-27 20:48

Re: Ftp server
 
can someone please provide a direct link to instructions for the noobs here?
I installed proftpd, tried to make the autostart files as described above but no luck...

a simple guide would be highly appreciated...thx...

cafeine 2010-04-05 14:41

Re: Ftp server
 
It's pretty lame to have a working application and not a one page manual how to use it.

The comments in previous pages are not helpful for the noobs,i think a step by step guide is essential.

Can't anybody dedicate 1 hour to make it?...is it so difficult?


All times are GMT. The time now is 13:08.

vBulletin® Version 3.8.8