一個客制化image下作FTP server問題

我制作了一个客制化Image,其中有Telnet 与FTP的功能,Telnet亦可正常使用,而FTP的功能,客制化Image当Server,我用其它PC可以作login,但是有以下现象:
1、作 get时须在 /home/sam的目录下
2、作put 时须在 /tmp的目录下
3、其中若我在 /tmp的目录下作 get时,会有error message : not a plain file

问题如下:
1、我可以把get 和put在同一个目录下完成吗
2、Not a plain file 的意思是什么

你设置用户和其FTP目录了吗?

How do I set the FTP path? I don’t know!
This is my image program.


[virtual=x86,bios +compress] .bootstrap = {
startup-bios
PATH=/proc/boot procnto -smp
}

[+script] startup-script = {
display_msg “Welcome to QNX Neutrino on an PC compatible BIOS system for SMP”
seedres
pci-bios &
waitfor /dev/pci

Start 1 keyboard console

devc-con -n8 &

Start serial A driver

waitfor /dev/con1
reopen /dev/con1
#reopen
devc-ser8250 -e -b38400
waitfor /dev/ser1
pipe
#touch /tmp/syslog
syslogd
slogger

scan IDE machine

devb-eide
#devb-eide blk cache=5M
waitfor /dev/hd0
mount /dev/hd0 /
devc-pty



display_msg “Start network interface”

#i82544 net card
io-net -di82544 vid=0x8086,did=0x109a,verbose=4 -pttcpip if=en0:10.153.29.95:255.255.255.0
-v &

waitfor /dev/socket

waitfor /dev/ptyp0 4

qconn port=8000
inetd &
qconn &
display_msg “Startup Finish”
[+session] PATH=/bin:/proc/boot esh &
}

Make /tmp point to the shared memory area…

[type=link] /tmp=/dev/shmem

Programs require the runtime linker (ldqnx.so) to be at

a fixed location

[type=link] /usr/lib/ldqnx.so.2=/proc/boot/libc.so

[type=link] /bin/sh=/bin/esh

We use the “c” shared lib (which also contains the

runtime linker)

libc.so
libm.so
libsocket.so
npm-ttcpip.so

#devn-ne2000.so
#D-link net card LIB
devn-via-rhine.so

#RTL net card LIB
devn-rtl.so

devn-i82544.so
io-blk.so
fs-qnx4.so
cam-disk.so
libcam.so

\

The files above this line can be shared by multiple

processes

[data=c]
devc-con
devc-ser8250
devc-pty
pci-bios
seedres
mqueue
pipe
io-net
/bin/echo=echo
/bin/stty=stty
cat
tail
pci
ifconfig
ping
syslogd
slogger
ls
qconn
pidin
pdebug
slay
mount
devb-eide
ftp
inetd
shutdown
sin
use
esh
mount
sloginfo
telnet


#Services (telnetd etc) config

/usr/sbin/telnetd=telnetd
/usr/sbin/ftpd=ftpd
/bin/login=login
/bin/sh=esh

/etc/ppp/chap-secrets = {

Client Server Secret Addrs

#########################################

  •       *           "password"  *
    

}
/etc/syslog.conf = {
. /tmp/syslog
. /…/…
}

Inetd config Files

/etc/services= /etc/services
/etc/protocols= /etc/protocols
/etc/termcap= /etc/termcap
/etc/passwd= /etc/passwd
/etc/default/login= /etc/default/login
/etc/resolv.conf= /etc/resolv.conf
/etc/shadow = /etc/shadow
#061218-ftp
/home/sam = /home/sam

/etc/inetd.conf = {
telnet stream tcp nowait root /usr/sbin/telnetd in.telnetd
#tftp dgram udp wait root /usr/sbin/tftpd in.tftpd
ftp stream tcp nowait root /usr/sbin/ftpd in.ftpd
-l
}


#061218-ftp deline
/etc/services={
ftp 21/tcp
telnet 23/tcp
}

#061218-ftp deline
/etc/ftpusers={

}

#061218-ftp deline
/etc/shadow={
ftplogin:CG9N9yA3IoFtw:1162274304:0:0

}

#061218-ftp deline
/etc/passwd={
root::0:0:Superuser:/:/bin/sh
ftp:x:14:80:FTP User:/:
ftplogin:x:0:0::/home/sam:/bin/sh
}

应改是可以的。但我注意到/home/sam是在你的image里面的吧。你的image是只读的,你不能往里面写东西。你在启动时,开启了EIDE支持,你的目标有硬盘吗?

你的问题是 /tmp 是链接到 /dev/shmem的,而/dev/shmem不是一个POSIX文件系统。ftpd不认/dev/shmem/ 下的文件。

如果你一定需要一个基于内存的文件系统,用devb-ram比较好一点。