Fedora Linux Support Community & Resources Center
  #1  
Old 14th February 2012, 02:16 PM
ddebevec Offline
Registered User
 
Join Date: Jul 2008
Posts: 23
windows_xp_2003ie
Need help with tftp problems

First off, I hope Iím in the correct forum. If not, please direct me to the correct one.

Can someone please help me to get my tftp issue straight? What started out as a seemingly simple installation and use of tftp is turning out to be a quite frustrating journey. I based my installation on another userís experience as found on the internet. My first attempts yielded numerous ďpermission deniedĒ messages. After countless searches and trying oh so many suggested configurations, Iím now dealing with the ďcannot set groups for user nobodyĒ messages. Can someone please help lead me out of this tftp nightmare that I seem to be having?

Background

Iím running fedora 14 32 bit and Iíve listed my configurations and messages below:

My latest /etc/xinetd.d/tftp member

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

My directory and file permissions and structure:

/var/lib/tfrtboot

drwxrwxrwx 2 nobody nobody 4096 Feb 5 22:39 tftpboot


[root@elisha lib]# cd tftpboot
[root@elisha tftpboot]# ll
total 7724
-rw-rwxrwx 1 root root 165108 Feb 5 22:39 ap61.ram
-rw-rwxrwx 1 root root 165656 Feb 5 22:39 ap61.rom
-rw-rwxrwx 1 root root 3784732 Feb 5 22:39 ar430w-firmware.bin
-rw-rwxrwx 1 root root 3784704 Feb 5 22:39 linux.bin

Output from process status:

[root@elisha /]# ps -ef | grep tftp
nobody 26980 26910 0 21:08 ? 00:00:00 in.tftpd -s /var/lib/tftpboot

Syslog output from execution:

Feb 13 21:08:17 elisha xinetd[26910]: START: tftp pid=26980 from=192.168.20.81
Feb 13 21:08:17 elisha in.tftpd[26981]: cannot set groups for user nobody
Feb 13 21:09:34 elisha in.tftpd[26986]: cannot set groups for user nobody
Feb 13 21:12:16 elisha in.tftpd[26993]: cannot set groups for user nobody
Feb 13 21:13:35 elisha xinetd[26910]: EXIT: tftp status=0 pid=26980 duration=1199(sec)
Reply With Quote
  #2  
Old 14th February 2012, 02:52 PM
jpollard Offline
Registered User
 
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,662
linuxfedorafirefox
Re: Need help with tftp problems

Quite possibly you missed the point that tftpd should run as its own user and not as nobody.

Granted, nobody is better than root. BUT... nobody is given no permissions via SELinux... and I think that should be blocking it from working.

Try the defaults first - it already is supposed to be run as nobody, but the way it gets there may be different than that from the -u option which sets the privileges via /etc/shadow, and you don't want to muck with those as the nobody account gets used for a lot of other things too.

BTW, you also need to check the security labels on the files tftpboot is to provide. I don't think you want them writable at any time either.
Reply With Quote
  #3  
Old 14th February 2012, 02:56 PM
flyingfsck Offline
Registered User
 
Join Date: Aug 2010
Location: Al Ain, UAE
Posts: 1,560
linuxfirefox
Re: Need help with tftp problems

BTW, tftp has NO security. Therefore, it is coded to only allow downloads from a directory that is set to read only.

You probably don't need any of the other things you have done...
Reply With Quote
  #4  
Old 14th February 2012, 03:07 PM
bob Offline
Administrator (yeah, back again)
 
Join Date: Jul 2004
Location: Colton, NY; Junction of Heaven & Earth (also Routes 56 & 68).
Age: 68
Posts: 21,995
linuxfirefox
Re: Need help with tftp problems

moved to EOL (F14's now obsolete)
__________________
Linux & Beer - That TOTALLY Computes!
Registered Linux User #362651


Don't use any of my solutions on working computers or near small children.
Reply With Quote
  #5  
Old 14th February 2012, 05:11 PM
ddebevec Offline
Registered User
 
Join Date: Jul 2008
Posts: 23
windows_xp_2003ie
Re: Need help with tftp problems

All,

Thank you for your responses. Iím not currently with my machine, so Iíll have to wait until tonight to try your suggestions. Also I have SELinux disabled, could that be causing my problems?
Reply With Quote
  #6  
Old 14th February 2012, 06:36 PM
flyingfsck Offline
Registered User
 
Join Date: Aug 2010
Location: Al Ain, UAE
Posts: 1,560
linuxfirefox
Re: Need help with tftp problems

SELinux disabled means it does nothing, so don't worry about it. Do read the tftp man page though. Your issues are very like discussed in there.
Reply With Quote
  #7  
Old 14th February 2012, 07:51 PM
stevea Offline
Registered User
 
Join Date: Apr 2006
Location: Ohio, USA
Posts: 8,553
linuxfedorafirefox
Re: Need help with tftp problems

Quote:
Originally Posted by flyingfsck View Post
BTW, tftp has NO security. Therefore, it is coded to only allow downloads from a directory that is set to read only.

You probably don't need any of the other things you have done...
That's not true. I just tested it.

You will want to kill any currently running daemon and resatart xinetd to effect and /etc/xinetd.d/tftp changes..

sudo pkill -1 in.tftpd
sudo service xinetd restart



Code:
service tftp
{
disable = no
socket_type = dgram
protocol = udp
wait = no
user = root
server = /usr/sbin/in.tftpd
server_args = -s -c /var/lib/tftpboot -u nobody
per_source = 11
cps = 100 2
flags = IPv4
}
The wait flag should be yes, and that may cause a problem, tho' not likely.

---

I suspect you have a messed up group assignment for nobody account.
grep "nobody:" /etc/{passwd,group}

should return lines like ....
Code:
/etc/passwd:nobody:x:99:99:Nobody:/:/sbin/nologin
/etc/group:nobody:x:99:
and maybe others.

If no group entry '99' (based on the /etc/passwd line) with nobody text as an entry - then create it using system-config-users as root.

Then kill the in.tftpd daemon and try again.
__________________
None are more hopelessly enslaved than those who falsely believe they are free.
Johann Wolfgang von Goethe

Last edited by stevea; 14th February 2012 at 08:03 PM.
Reply With Quote
  #8  
Old 15th February 2012, 03:08 AM
ddebevec Offline
Registered User
 
Join Date: Jul 2008
Posts: 23
linuxfirefox
Re: Need help with tftp problems

I tried your suggestions and now I'm see the message:

Feb 14 18:12:12 elisha xinetd[30244]: START: tftp pid=30248 from=192.168.20.81
Feb 14 18:12:12 elisha in.tftpd[30248]: /var/lib/tftpboot: Permission denied
Feb 14 18:12:12 elisha xinetd[30244]: EXIT: tftp status=66 pid=30248 duration=0(sec)

I removed the "-u nobody" from the "tftp" member, changed the file permissions to read. Changed the owner and group to "nobody" and the wait parameter to yes. I removed all options from the tftp member.

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

Is it getting better or worse?
Reply With Quote
  #9  
Old 15th February 2012, 04:49 AM
flyingfsck Offline
Registered User
 
Join Date: Aug 2010
Location: Al Ain, UAE
Posts: 1,560
linuxfirefox
Re: Need help with tftp problems

Howdy,

Do you get more useful error messages if you run it manually?
# /usr/sbin/in.tftpd -s /var/lib/tftpboot
Reply With Quote
  #10  
Old 15th February 2012, 05:20 AM
ddebevec Offline
Registered User
 
Join Date: Jul 2008
Posts: 23
linuxfirefox
Re: Need help with tftp problems

When I execute the command basically the terminal session just goes into a do_wait state and the log displays the following:

Feb 14 20:01:25 elisha xinetd[30914]: START: tftp pid=30931 from=192.168.20.81
Feb 14 20:01:25 elisha in.tftpd[30931]: /var/lib/tftpboot: Permission denied
Feb 14 20:01:25 elisha xinetd[30914]: EXIT: tftp status=66 pid=30931 duration=0(sec)

I'm curious if the file owner, group and permission are correct. I've seen so many different iterations of these values not to mention the user parameter in the tftp member.
Reply With Quote
  #11  
Old 15th February 2012, 12:40 PM
jpollard Offline
Registered User
 
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,662
linuxfedorafirefox
Re: Need help with tftp problems

Server args needs to be "-s /var/lib/tftpboot". This allows the boot process to refer to the files by base name, and not "/var/lib/tftpboot/<basename>".

It also prevents them from downloading password files...

Now as to why it does not have permission, how about reporting the output of the following sequence (sequence and expected results are shown):
Code:
$ ls -lZd /var
drwxr-xr-x. root root system_u:object_r:var_t:s0       /var
$ ls -lZd /var/lib
drwxr-xr-x. root root system_u:object_r:var_lib_t:s0   /var/lib
$ ls -lZd /var/lib/tftpboot
drwxr-xr-x. root root system_u:object_r:tftpdir_rw_t:s0 /var/lib/tftpboot
$

forgot one:

$ ls -lZ /var/lib/tftpboot

(mine is empty)
Reply With Quote
  #12  
Old 15th February 2012, 01:08 PM
ddebevec Offline
Registered User
 
Join Date: Jul 2008
Posts: 23
macossafari
Re: Need help with tftp problems

I will post this information this evening, after work. Again, thank you for your assistance in this matter.
Reply With Quote
  #13  
Old 15th February 2012, 04:58 PM
flyingfsck Offline
Registered User
 
Join Date: Aug 2010
Location: Al Ain, UAE
Posts: 1,560
linuxfirefox
Re: Need help with tftp problems

This is the problem: /var/lib/tftpboot: Permission denied

So change the tftp directory to something else and set the owner properly and make both the directory and the file that you want to access, read only.
Reply With Quote
  #14  
Old 15th February 2012, 10:39 PM
ddebevec Offline
Registered User
 
Join Date: Jul 2008
Posts: 23
linuxfirefox
Re: Need help with tftp problems

Here's the output you requested. Looks like mine doesn't match yours. I'm guessing I should try to match yours.


[root@elisha ~]# ls -lZd /var
drwxr-xr-x. root root system_u:object_r:var_t:s0 /var

[root@elisha ~]# ls -lZd /var/lib
drwxr-xr-x. root root system_u:object_r:var_lib_t:s0 /var/lib

[root@elisha ~]# ls -lZd /var/lib/tftpboot
dr--r--r-- nobody nobody ? /var/lib/tftpboot

[root@elisha ~]# ls -lZ /var/lib/tftpboot
-r--r--r-- nobody nobody ? ap61.ram
-r--r--r-- nobody nobody ? ap61.rom
-r--r--r-- nobody nobody ? ar430w-firmware.bin
-r--r--r-- nobody nobody ? linux.bin
[root@elisha ~]#
Reply With Quote
  #15  
Old 16th February 2012, 12:55 AM
jpollard Offline
Registered User
 
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,662
linuxfedorafirefox
Re: Need help with tftp problems

There it is.

I believe the directory /var/lib/tftpboot must have rx.

x allows the directory to be searched, and I believe that is what in.tftpd does when it starts.

The files in the directory are fine.
Reply With Quote
Reply

Tags
fedora 14 32 bit, problems, tftp

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't use tftp ACiD GRiM Servers & Networking 4 29th July 2009 12:32 PM
tftp will not start. johnfitz Using Fedora 5 18th June 2008 07:00 AM
where is tftp sonicss Servers & Networking 2 30th March 2008 03:18 PM


Current GMT-time: 12:09 (Monday, 21-04-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletinģ Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat