Merge pull request #14 from yjpa7145/MakePasvAddressConfigurable
Add ability to set passive address
This commit is contained in:
@@ -30,6 +30,9 @@ which is in the _whois_ debian package.
|
|||||||
|
|
||||||
- `FTP_CHOWN_ROOT`: if set `chown` will be run against `/srv` setting the FTP user and group as owner and group of the directory. _Note: chown is run non-recursively ie. will only chown the root`_
|
- `FTP_CHOWN_ROOT`: if set `chown` will be run against `/srv` setting the FTP user and group as owner and group of the directory. _Note: chown is run non-recursively ie. will only chown the root`_
|
||||||
|
|
||||||
|
- `FTP_PASV_ADDRESS`: override the IP address that vsftpd will advertise in
|
||||||
|
response to the PASV command
|
||||||
|
|
||||||
## Usage Example
|
## Usage Example
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|||||||
7
entry.sh
7
entry.sh
@@ -27,6 +27,13 @@ if [[ ! -z "${FTP_USERS_ROOT}" ]]; then
|
|||||||
sed -i 's/local_root=.*/local_root=\/srv\/$USER/' /etc/vsftpd*.conf
|
sed -i 's/local_root=.*/local_root=\/srv\/$USER/' /etc/vsftpd*.conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Support setting the passive address
|
||||||
|
if [[ ! -z "$FTP_PASV_ADDRESS" ]]; then
|
||||||
|
for f in /etc/vsftpd*.conf; do
|
||||||
|
echo "pasv_address=${FTP_PASV_ADDRESS}" >> "$f"
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
# Manage /srv permissions
|
# Manage /srv permissions
|
||||||
if [[ ! -z "${FTP_CHOWN_ROOT}" ]]; then
|
if [[ ! -z "${FTP_CHOWN_ROOT}" ]]; then
|
||||||
chown ftp:ftp /srv
|
chown ftp:ftp /srv
|
||||||
|
|||||||
Reference in New Issue
Block a user