Seems to be a default permissions problem? I'm running with systemd, and using the systemd socket unitfile (tftp.socket). The tftp server will connect fine, but not allow any transfers until after I've changed the directory permissions and restarted the service. Reproducible: Always
1) Please post your `emerge --info net-ftp/tftp-hpa' output in a comment. 2) Please provide steps to take which point out the problem.
mimir ~ # emerge --info tftp-hpa Portage 2.2.8-r1 (hardened/linux/amd64/no-multilib, gcc-4.7.3, glibc-2.19-r1, 3.15.5-hardened-r2 x86_64) ================================================================= System Settings ================================================================= System uname: Linux-3.15.5-hardened-r2-x86_64-AMD_E-350D_APU_with_Radeon-tm-_HD_Graphics-with-gentoo-2.2 KiB Mem: 16161488 total, 15258176 free KiB Swap: 1048572 total, 1048572 free Timestamp of tree: Sat, 02 Aug 2014 20:00:01 +0000 ld GNU ld (GNU Binutils) 2.23.2 distcc 3.1 x86_64-pc-linux-gnu [enabled] app-shells/bash: 4.2_p45 dev-java/java-config: 2.2.0 dev-lang/python: 2.7.7, 3.3.5-r1 dev-util/cmake: 2.8.12.2-r1 dev-util/pkgconfig: 0.28-r1 sys-apps/baselayout: 2.2 sys-apps/openrc: 0.12.4 sys-apps/sandbox: 2.6-r1 sys-devel/autoconf: 2.69 sys-devel/automake: 1.11.6, 1.12.6, 1.13.4 sys-devel/binutils: 2.23.2 sys-devel/gcc: 4.7.3-r1 sys-devel/gcc-config: 1.7.3 sys-devel/libtool: 2.4.2-r1 sys-devel/make: 3.82-r4 sys-kernel/linux-headers: 3.13 (virtual/os-headers) sys-libs/glibc: 2.19-r1 Repositories: gentoo chaos Installed sets: @base-system, @java, @portage ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/lib/unifi/data/system.properties" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-march=x86-64 -mtune=generic -O2 -pipe" DISTDIR="/usr/portage/distfiles" EMERGE_DEFAULT_OPTS=" --jobs --keep-going --newuse --deep --backtrack=3000 --complete-graph --with-bdeps=y" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs buildpkg clean-logs compress-build-logs compressdebug config-protect-if-modified distcc distlocks ebuild-locks fixlafiles installsources merge-sync news parallel-fetch parallel-install preserve-libs protect-owned sandbox sfperms split-elog split-log splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://mirrors.rit.edu/gentoo/ http://mirror.datapipe.net/gentoo http://mirror.usu.edu/mirrors/gentoo/ http://gentoo.mirrors.hoobly.com/ http://gentoo.netnitco.net" LANG="en_US.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_COMPRESS="xz" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/var/lib/layman/chaos" USE="acl amd64 autoipd avahi berkdb bzip2 clang cli cracklib crypt cxx dbus dri gd gdbm gudev hardened iconv ipv6 justify kerberos lm_sensors mdnsresponder-compat mmx modules ncurses networkmanager nls nptl openmp pam pax_kernel pcre postgres python readline samba session sse sse2 ssl systemd tcpd threads udisks unicode urandom xattr xtpax zeroconf zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev synaptics mouse keyboard wacom" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en en_US" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" QEMU_SOFTMMU_TARGETS="arm i386 x86_64" QEMU_USER_TARGETS="arm i386 x86_64" RUBY_TARGETS="ruby19 ruby20" USERLAND="GNU" VIDEO_CARDS="intel nouveau vesa modesetting fbdev qxl radeon r600 radeonsi" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, SYNC, USE_PYTHON ================================================================= Package Settings ================================================================= net-ftp/tftp-hpa-5.2-r1 was built with the following: USE="ipv6 readline tcpd (-selinux)"
Steps to reproduce 1) emerge tftp-hpa 2) systemctl enable tftp.socket 3) load files to /tftproot 4) try to transfer files to or from machine using tftp protocol 5) fail. Fix by "chmod -R 777 /tftproot" and restart tftp service (which sticks around after the socket activates it. I just rebooted the computer.)
Incidentally, if you compile tftp-hpa with USE="-ipv6", it won't work at all. But that's a different bug.
Why does it install that /tftproot directory in the first place? It looks like it was added to provide systemd "support".
I'm afraid that I'm not able to say. But having systemd "support" makes my life a lot easier, so I'd strongly prefer that the systemd "support" not be removed. I'd just like it to work, is all. Seems like adding explicit perms to the /tftproot directory is a simple enough way to repair the problem I'm experiencing.
it shouldn't be created in the first place. it's up to the admin to pick the dir that is appropriate for their site and to set it up as they need.
should be all set now in the tree; thanks for the report! Commit message: Do not create an empty /tftproot http://sources.gentoo.org/net-ftp/tftp-hpa/tftp-hpa-5.2-r1.ebuild?r1=1.11&r2=1.12
The unit file hardcodes the directory... we will need to make the unit file configurable to allow people to set the directory they want I guess
(In reply to Pacho Ramos from comment #9) systemd files are already configurable -- if you don't like the defaults, copy them locally and make your changes. if you want something more than that, then someone who cares about systemd will have to look.
Hi, can we change the bug back to it's original description? I don't want to be able to configure the directory, I want the default installed directory to work out of the box. Thanks
(In reply to Michael Jones from comment #11) > can we change the bug back to it's original description? I don't want to be > able to configure the directory, I want the default installed directory to > work out of the box. As far as I can tell, it doesn't work "out of the box" with the openrc init script or xinetd. The sysadmin has to set up a directory and possibly modify the appropriate startup file. The conf.d file says as much. # Path to server files from # Depending on your application you may have to change this. # This is commented out to force you to look at the file! #INTFTPD_PATH="/var/tftp/" #INTFTPD_PATH="/tftpboot/" #INTFTPD_PATH="/tftproot/" The systemd unit is no different; this isn't really even a systemd-related bug at all.
(In reply to SpanKY from comment #8) > should be all set now in the tree; thanks for the report! > > Commit message: Do not create an empty /tftproot > http://sources.gentoo.org/net-ftp/tftp-hpa/tftp-hpa-5.2-r1.ebuild?r1=1. > 11&r2=1.12 As unit file is using /tftproot, we would only need to provide a tmpfiles.d file to create that directory
(In reply to Pacho Ramos from comment #13) > As unit file is using /tftproot, we would only need to provide a tmpfiles.d > file to create that directory I'm not sure it makes sense to use tmpfiles for this; the tftproot should be a persistent directory *set up by the sysadmin*, not a temporary one created by default.
The problem is that if we force in .service file /tftproot to be used I think we should provide that directory instead of simply installing a unit file that will fail as-is by default :/
(In reply to Pacho Ramos from comment #15) > The problem is that if we force in .service file /tftproot to be used I > think we should provide that directory instead of simply installing a unit > file that will fail as-is by default :/ I think this is fine.
OK, then, closing this as-is, I guess people familiar with this software will figure out what is wrong when they get the failure