LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 06-29-2011, 08:44 AM   #1
lzgonline
LQ Newbie
 
Registered: Jun 2011
Distribution: CentOS 5.5
Posts: 5

Rep: Reputation: Disabled
Red face How to upload file with tftp service?


Hi,this is the tftp configure in my linux server,

service tftp
{
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -c -s /tftpboot
disable = no
per_source = 11
cps = 100 2
flags = IPv4
}

when I upload file,it just show Error code 0: Permission denied,download is well.

another question,what's the option "-c" in the argument server_args mean? is there any more options in server_args? what mean and how to use them?

thanks advance!
 
Old 06-29-2011, 11:23 AM   #2
TB0ne
Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 14,767

Rep: Reputation: 2613Reputation: 2613Reputation: 2613Reputation: 2613Reputation: 2613Reputation: 2613Reputation: 2613Reputation: 2613Reputation: 2613Reputation: 2613Reputation: 2613
Quote:
Originally Posted by lzgonline View Post
Hi,this is the tftp configure in my linux server,
Code:
service tftp
{
socket_type             = dgram
protocol                = udp
wait                    = yes
user                    = root
server                  = /usr/sbin/in.tftpd
server_args             = -c -s /tftpboot
disable                 = no
per_source              = 11
cps                     = 100 2
flags                   = IPv4
}
when I upload file,it just show Error code 0: Permission denied,download is well. another question,what's the option "-c" in the argument server_args mean? is there any more options in server_args? what mean and how to use them?
thanks advance!
What version/distro of Linux? And if you'd like to know about the server arguments, have you tried reading the man page for tfptd?? Type in "man tftpd", and there they are. Chances are, either you don't have the directory set up correctly/right permissions, or you're having an SELinux issue. You don't say what version/distro of Linux, but go into your security settings, and change tftpd from "enforce" to "complain".

Also, there are lots of hits for this error on Google, have you looked?
http://www.techietips.net/node/18
 
Old 06-29-2011, 03:19 PM   #3
jefro
Guru
 
Registered: Mar 2008
Posts: 11,714

Rep: Reputation: 1439Reputation: 1439Reputation: 1439Reputation: 1439Reputation: 1439Reputation: 1439Reputation: 1439Reputation: 1439Reputation: 1439Reputation: 1439
What is the users file permissions on the place you are trying to access?
 
Old 06-29-2011, 08:45 PM   #4
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,289

Rep: Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034
Are you confusing tftp with ftp?
The former is normally used for autoloading an OS at boot (see PXE boot).
FTP is the normal ftp server for loading files.

TFTPD http://linux.die.net/man/8/tftpd
Typically FTP is provided by http://linux.die.net/man/8/vsftpd

Which distro & version have you got? Pls add it to your profile, thx.
 
Old 06-29-2011, 11:48 PM   #5
lzgonline
LQ Newbie
 
Registered: Jun 2011
Distribution: CentOS 5.5
Posts: 5

Original Poster
Rep: Reputation: Disabled
Smile

Quote:
Originally Posted by TB0ne View Post
What version/distro of Linux? And if you'd like to know about the server arguments, have you tried reading the man page for tfptd?? Type in "man tftpd", and there they are. Chances are, either you don't have the directory set up correctly/right permissions, or you're having an SELinux issue. You don't say what version/distro of Linux, but go into your security settings, and change tftpd from "enforce" to "complain".

Also, there are lots of hits for this error on Google, have you looked?
http://www.techietips.net/node/18

Linux version 2.6.32-71.el6.i686,RedHat Enterprise Linux 6.0
the directory permissions set to 777,still not work,I've searched google,all say it's the permission problem,but it not work..

"man tftpd" is useful,thank you.
 
Old 06-29-2011, 11:52 PM   #6
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,289

Rep: Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034
Is xinetd running?
What about iptables (firewall) settings?
chkconfig http://www.linuxtopia.org/online_boo...chkconfig.html ?
 
Old 06-29-2011, 11:52 PM   #7
lzgonline
LQ Newbie
 
Registered: Jun 2011
Distribution: CentOS 5.5
Posts: 5

Original Poster
Rep: Reputation: Disabled
Smile

Quote:
Originally Posted by jefro View Post
What is the users file permissions on the place you are trying to access?
the tftpd working directory and files in it all are set to 777
 
Old 06-29-2011, 11:55 PM   #8
lzgonline
LQ Newbie
 
Registered: Jun 2011
Distribution: CentOS 5.5
Posts: 5

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by chrism01 View Post
Is xinetd running?
What about iptables (firewall) settings?
chkconfig http://www.linuxtopia.org/online_boo...chkconfig.html ?
yes,of course,I'd tried stop firewall,but not helpful
 
Old 06-30-2011, 04:21 PM   #9
jefro
Guru
 
Registered: Mar 2008
Posts: 11,714

Rep: Reputation: 1439Reputation: 1439Reputation: 1439Reputation: 1439Reputation: 1439Reputation: 1439Reputation: 1439Reputation: 1439Reputation: 1439Reputation: 1439
Wonder if you shouldn't logon with a user and not root.

tftp user@ipaddress
 
Old 06-30-2011, 08:37 PM   #10
TB0ne
Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 14,767

Rep: Reputation: 2613Reputation: 2613Reputation: 2613Reputation: 2613Reputation: 2613Reputation: 2613Reputation: 2613Reputation: 2613Reputation: 2613Reputation: 2613Reputation: 2613
Quote:
Originally Posted by lzgonline View Post
Linux version 2.6.32-71.el6.i686,RedHat Enterprise Linux 6.0
the directory permissions set to 777,still not work,I've searched google,all say it's the permission problem,but it not work..
Did you check selinux, as suggested?? And it would still help if you posted an actual error message, rather than "it not work"...that doesn't give us alot to go on. What are you trying/typing to upload the file? What user ID are you logging in with? How are you authenticating?

Most importantly...you're using RHEL. So, CALL REDHAT SUPPORT, since you're paying for it with your RHEL subscription, right?
Quote:
"man tftpd" is useful,thank you.
The man pages are the first thing to check for pretty much everything.
 
Old 06-30-2011, 08:44 PM   #11
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,104

Rep: Reputation: 369Reputation: 369Reputation: 369Reputation: 369
just curious but what are you trying to accomplish by using tftp for uploading files instead of ftp or sftp (ssh ftp)
tftp is a connectionless protocol if i recall correctly so there is little if any verification that the file made it in one piece at the other end
usually as mentioned, tftp is used for booting a diskless system, or updating firmware/configuration of network devices such as routers.
 
Old 06-30-2011, 09:27 PM   #12
jefro
Guru
 
Registered: Mar 2008
Posts: 11,714

Rep: Reputation: 1439Reputation: 1439Reputation: 1439Reputation: 1439Reputation: 1439Reputation: 1439Reputation: 1439Reputation: 1439Reputation: 1439Reputation: 1439
Also you could try it locally on your system I believe instead of over nic.
 
  


Reply

Tags
tftp


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
after re-create tftp dir, tftp doesn't work anymore lastguy Linux - Networking 2 11-16-2007 03:33 PM
tftp issue, unable to transfer kernel image using tftp to boot ltsp-client noobs4linux Linux - Networking 1 02-07-2007 01:53 AM
tftp upload Ammad Linux - General 6 12-28-2006 09:00 AM
how to set up tftp service techjp Linux - Networking 1 07-03-2004 01:30 AM
service tftp othermatty Linux - Networking 1 09-29-2003 01:09 AM


All times are GMT -5. The time now is 05:06 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration