질문&답변
클라우드/리눅스에 관한 질문과 답변을 주고 받는 곳입니다.
리눅스 분류

in.tftpd 사용자 계정으로 구동이 가능한가요?

작성자 정보

  • 구르미 작성
  • 작성일

컨텐츠 정보

본문

사용자 계정으로 in.tftpd 구동을 시도하고 있습니다.

하지만 사용자 권한으로 tftpd 데몬을 구동하지 못하겠네요.

도움을 주세요.ㅠㅠ

 

아래는 제가 설치 및 구동을 시도하며 정리한 내용입니다.

 

$ wget http://www.kernel.org/pub/software/network/tftp/tftp-hpa-0.45.tar.gz
$ tar zxvf tftp-hpa-0.45.tar.gz
$ cd tftp-hpa-0.45
$ ./configure --prefix /home/staff/cloud/tftp; make; make install
$ mkdir /home/cloud/tftpdata
$ chmod 777 /home/cloud/tftpdata/

구동 시도한 옵션들

n.tftpd -l -a 0.0.0.0:22222 -p -u cloud:staff -s /home/cloud/tftpdata

in.tftpd -l -a 210.109.102.247:33334 -s /home/cloud/tftpdata

in.tftpd -l -a 0.0.0.0:22222 -s /home/cloud/tftpdata/

in.tftpd -lv -a 127.0.0.1:33334 -s /home/cloud/tftpdata/

 

 

 

 

 

 

tftpd man 페이지

cloud@www:~/tftp/man/man8$ man -l in.tftpd.8


NAME
       tftpd - IPv4 Trivial File Transfer Protocol server

SYNOPSIS
       in.tftpd [options...]  directory...

DESCRIPTION
       tftpd  is  a  server  for the IPv4 Trivial File Transfer Protocol.  The
       TFTP protocol is extensively used to support remote booting of diskless
       devices.   The  server  is  normally started by inetd, but can also run
       standalone.

OPTIONS
       -l     Run the server in standalone (listen) mode, rather than run from
              inetd.   In  listen  mode,  the -t option is ignored, and the -a
              option can be used to specify a specific local address  or  port
              to listen to.

       -a [address][:port]
              Specify  a  specific  address  and port to listen to when called
              with the -l option.  The default is to listen to the  tftp  port
              specified in /etc/services on all local addresses.

       -c     Allow  new  files  to  be  created.  By default, tftpd will only
              allow upload of files that already  exist.   Files  are  created
              with  default permissions allowing anyone to read or write them,
              unless the -p or -U options are specified.

       -s     Change root directory on startup.  This means  the  remote  host
              does  not need to pass along the directory as part of the trans-
              fer, and may add security.  When -s is  specified,  exactly  one
              directory  should  be specified on the command line.  The use of
              this option is recommended for security as well as compatibility
              with  some  boot  ROMs  which cannot be easily made to include a
              directory name in its request.

       -u username
              Specify the username which tftpd will run  as;  the  default  is
              "nobody".   The user ID, group ID, and (if possible on the plat-
              form) the supplementary group IDs will be set to the ones speci-
              fied in the system permission database for this username.

       -U umask
              Sets  the  umask for newly created files to the specified value.
              The default is zero (anyone can read or write) if the -p  option
              is  not  specified, or inherited from the invoking process if -p
              is specified.

       -p     Perform no additional permissions checks above the  normal  sys-
              tem-provided  access  controls for the user specified via the -u
              option.

       -t timeout
              When run from inetd this specifies how long, in seconds, to wait
              for  a  second  connection before terminating the server.  inetd
              will then respawn the server when another request comes in.  The
              default is 900 (15 minutes.)

       -T timeout
              Determine the default timeout, in microseconds, before the first
              packet is retransmitted.  This can be modified by the client  if
              the  timeout  or  utimeout option is negotiated.  The default is
              1000000 (1 second.)

       -m remap-file
              Specify the use of filename remapping.  The remap-file is a file
              containing  the  remapping  rules.   See the section on filename
              remapping below.  This option may not be compiled  in,  see  the
              output  of in.tftpd -V to verify whether or not it is available.

       -v     Increase the logging verbosity of tftpd.  This flag can be spec-
              ified multiple times for even higher verbosity.

       -r tftp-option
              Indicate  that  a  specific RFC 2347 TFTP option should never be
              accepted.

       -B max-block-size
              Specifies the maximum permitted block size.  The permitted range
              for  this parameter is from 512 to 65464.  Some embedded clients
              request large block sizes and yet do not handle fragmented pack-
              ets  correctly; for these clients, it is recommended to set this
              value to the smallest MTU on your network  minus  32  bytes  (20
              bytes  for  IP,  8  for  UDP, and 4 for TFTP; less if you use IP
              options on your network.)  For example, on a  standard  Ethernet
              the  specified  option.   This  version of tftpd can support any
              block size up to the theoretical maximum of 65464 bytes.

       blksize2 (nonstandard)
              Set the transfer block size to anything less than  or  equal  to
              the  specified  option,  but  restrict the possible responses to
              powers of 2.  The maximum is 32768 bytes (the largest power of 2
              less than or equal to 65464.)

       tsize (RFC 2349)
              Report  the  size  of  the file that is about to be transferred.
              This version of tftpd only supports the tsize option for  binary
              (octet) mode transfers.

       timeout (RFC 2349)
              Set the time before the server retransmits a packet, in seconds.

       utimeout (nonstandard)
              Set  the  time  before  the  server  retransmits  a  packet,  in
              microseconds.

       The -r option can be used to disable specific options; this may be nec-
       essary to work around bugs in  specific  TFTP  client  implementations.
       For  example,  some TFTP clients have been found to request the blksize
       option, but crash with  an  error  if  they  actually  get  the  option
       accepted by the server.

관련자료

댓글 1

임근식님의 댓글

  • 임근식
  • 작성일
사용자 권한으로 구동을 하고자 한다면  sudo 라는 것을 이용하여 특정 사용자에게
ftp 데몬을 가동할수 있도록 하시는 것을 권장합니다. 설정방법은 간단하게
/etc/sudoers 파일을 수정하시면 됩니다.

공지사항


뉴스광장


  • 현재 회원수 :  60,040 명
  • 현재 강좌수 :  35,850 개
  • 현재 접속자 :  166 명