vsftpd

This forum is for topics dealing with problems with software specifically in the ARMv6h repo.

vsftpd

Postby moustach3 » Wed Dec 06, 2017 6:33 pm

Hi there!

im' trying vsftpd on my local network.
It just works out_of-the-box, without enabling users to upload.

I'd like to upload files from my local network to my Rpi. Anonymously.

I enabled those things in vsftpd.conf but anonymous upload is still forbidden.
$this->bbcode_second_pass_code('', '
# Allow anonymous FTP? (Beware - allowed by default if you comment this out).
anonymous_enable=YES
#
# Uncomment this to allow local users to log in.
#local_enable=YES
#
# Uncomment this to enable any form of FTP write command.
write_enable=YES
#
# Default umask for local users is 077. You may wish to change this to 022,
# if your users expect that (022 is used by most other ftpd's)
#local_umask=022
#
# Uncomment this to allow the anonymous FTP user to upload files. This only
# has an effect if the above global write enable is activated. Also, you will
# obviously need to create a directory writable by the FTP user.
anon_upload_enable=YES
#
# Uncomment this if you want the anonymous FTP user to be able to create
# new directories.
anon_mkdir_write_enable=YES
#
# Activate directory messages - messages given to remote users when they
# go into a certain directory.
dirmessage_enable=YES
#
# Activate logging of uploads/downloads.
xferlog_enable=YES
#
# Make sure PORT transfer connections originate from port 20 (ftp-data).
connect_from_port_20=YES

')
moustach3
 
Posts: 3
Joined: Fri Aug 25, 2017 7:52 pm

Re: vsftpd

Postby andre » Thu Dec 07, 2017 7:24 pm

I'm maybe asking the obvious, is the upload directory writable by the ftp user? Also, what do the logs say?
andre
 
Posts: 68
Joined: Wed Jan 25, 2012 1:39 pm
Location: Eindhoven

Re: vsftpd

Postby moustach3 » Mon Dec 11, 2017 8:46 pm

1. service is running

$this->bbcode_second_pass_code('', 'sudo systemctl status vsftpd
● vsftpd.service - vsftpd daemon
Loaded: loaded (/usr/lib/systemd/system/vsftpd.service; enabled; vendor preset: disab
Active: active (running) since Mon 2017-12-11 19:57:47 UTC; 21min ago
')

2. `/var/log/vsftpd.log` is empty (!)

3. `man vsftpd.conf` tells there is an `anon_root` which is <None> by default.
I didn't see this template in`vsftpd.conf` so i now add this line
$this->bbcode_second_pass_code('', 'anon_root=/srv/ftp')

4. ls -lisa /srv/ftp
$this->bbcode_second_pass_code('', '
/srv/ftp:
total 2816
262152 4 dr-xr-xr-x 2 root ftp 4096 6 déc. 17:30 .
262150 4 drwxr-xr-x 4 root root 4096 18 août 20:43 ..
294227 2808 -rw-r--r-- 1 root root 2872817 6 déc. 17:05 ithink.ogg
')

See that user ftp hasn't w permission (nor the owner, root). I add it
$this->bbcode_second_pass_code('', 'chmod +w ftp /srv/ftp')

The strange thing: if i leave 555 as it was for /srv/ftp, I can access remotely (readonly) by ftp://alarmpi
With 775, my client tells "Unable to access location"
moustach3
 
Posts: 3
Joined: Fri Aug 25, 2017 7:52 pm


Return to ARMv6h

Who is online

Users browsing this forum: No registered users and 3 guests