diff options
author | Maxime Hadjinlian <maxime.hadjinlian@gmail.com> | 2015-10-04 15:31:34 +0200 |
---|---|---|
committer | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2015-10-10 19:31:25 +0200 |
commit | 4e175f75e53d7b2a1df63a731eaf6617b54082d2 (patch) | |
tree | b325e0827774f9031cb8434490947956bc5271b9 | |
parent | dd73abb9691e122fd5dafecbb6bf421c1a23df33 (diff) | |
download | buildroot-4e175f75e53d7b2a1df63a731eaf6617b54082d2.tar.gz buildroot-4e175f75e53d7b2a1df63a731eaf6617b54082d2.zip |
vsftpd: Add ftp user creation
In order to remove '/home/ftp' and the ftp user from the 'skeleton'
package, we need to add the creation of the ftp users to the package so
it still work out of the box (with an anonymous user).
[Thomas:
- remove the VSFTPD_FIX_HOME_PERMISSIONS variable, and simply put the
additional command in VSFTPD_INSTALL_TARGET_CMDS.
- slightly tweak the comment.]
Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
Reviewed-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-rw-r--r-- | package/vsftpd/vsftpd.mk | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/package/vsftpd/vsftpd.mk b/package/vsftpd/vsftpd.mk index 1e482647ad..db969f4352 100644 --- a/package/vsftpd/vsftpd.mk +++ b/package/vsftpd/vsftpd.mk @@ -43,16 +43,25 @@ define VSFTPD_BUILD_CMDS LDFLAGS="$(TARGET_LDFLAGS)" LIBS="$(VSFTPD_LIBS)" -C $(@D) endef +define VSFTPD_USERS + ftp -1 ftp -1 * /home/ftp - - Anonymous FTP User +endef + define VSFTPD_INSTALL_INIT_SYSV $(INSTALL) -D -m 755 package/vsftpd/S70vsftpd $(TARGET_DIR)/etc/init.d/S70vsftpd endef +# vsftpd won't work if the jail directory is writable, it has to be +# readable only otherwise you get the following error: +# 500 OOPS: vsftpd: refusing to run with writable root inside chroot() +# That's why we have to adjust the permissions of /home/ftp define VSFTPD_INSTALL_TARGET_CMDS $(INSTALL) -D -m 755 $(@D)/vsftpd $(TARGET_DIR)/usr/sbin/vsftpd test -f $(TARGET_DIR)/etc/vsftpd.conf || \ $(INSTALL) -D -m 644 $(@D)/vsftpd.conf \ $(TARGET_DIR)/etc/vsftpd.conf $(INSTALL) -d -m 700 $(TARGET_DIR)/usr/share/empty + $(INSTALL) -d -m 555 $(TARGET_DIR)/home/ftp endef $(eval $(generic-package)) |