Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
cannot upload files to ftp server(vsftpd)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1523

PostPosted: Sat Apr 12, 2014 11:44 am    Post subject: cannot upload files to ftp server(vsftpd) Reply with quote

here's my configuration file:
anonymous_enable=YES
anon_root=/media/
write_enable=YES
anon_upload_enable=YES
anon_mkdir_write_enable=YES
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
listen=YES


I mounted ftp using curlftpfs and fstab:
curlftpfs#pc /media/pc fuse allow_other,uid=1000,gid=1000 0 0

whenever I try to copy or mkdir I get the following:
cp: cannot create regular file ‘./Unsaved Document 1’: No such file or directory

mkdir: cannot create directory ‘test’: Operation not permitted

journalctl has nothing to say:
Apr 12 14:32:24 localhost systemd[1]: Started Vsftpd ftp daemon.

but then again I haven't really configured journalctl.

thanks
Back to top
View user's profile Send private message
gerdesj
l33t
l33t


Joined: 29 Sep 2005
Posts: 621
Location: Yeovil, Somerset, UK

PostPosted: Sat Apr 12, 2014 4:22 pm    Post subject: Re: cannot upload files to ftp server(vsftpd) Reply with quote

First thoughts:

Best not to use /media for ftproot - it's used by some auto mounters for CDs/DVDs/USB

What user is your ftp daemon running as? #ps aux | grep ftpd and does it have permissions for the ftproot directory?

Cheers
Jon
Back to top
View user's profile Send private message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1523

PostPosted: Sat Apr 12, 2014 6:16 pm    Post subject: Reply with quote

root 1281 0.0 0.0 8528 600 ? Ss 21:04 0:00 /usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf
I think the new automount partition is /run/media
I never had anything mounted under /media
Back to top
View user's profile Send private message
gerdesj
l33t
l33t


Joined: 29 Sep 2005
Posts: 621
Location: Yeovil, Somerset, UK

PostPosted: Sun Apr 13, 2014 9:45 pm    Post subject: Reply with quote

I've got some vsftpds running somewhere. I'll have a look for them tomorrow am and send you some better ideas. I'm running on GMT+1 (BST)

I'd still recommend creating something like /var/lib/ftp or /srv/ftp - it's where that sort of thing belongs.

Oh what the heck - I'll probably need an ftp daemon on my laptop one day - engaging emerge ....

Cheers
Jon
Back to top
View user's profile Send private message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1523

PostPosted: Thu Apr 17, 2014 12:04 pm    Post subject: Reply with quote

thanks
I appreciate your help
Back to top
View user's profile Send private message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1523

PostPosted: Mon Apr 21, 2014 6:27 am    Post subject: Reply with quote

help anyone?
Back to top
View user's profile Send private message
pa4wdh
l33t
l33t


Joined: 16 Dec 2005
Posts: 812

PostPosted: Mon Apr 21, 2014 9:24 am    Post subject: Reply with quote

I also use vsftpd, and from your configuration i can't see if you're actually using anonymous ftp.

In case you do, vsftpd's behavior recently changed. Now it doesn't allow anonymous write access to it's ftp root, no matter what permissions you have on the filesystem. It might even refuse to work when the ftp root is world writable. I ended up creating a directory "upload" within the ftp root and made that world writable.

Maybe this works for you too ?
_________________
The gentoo way of bringing peace to the world:
USE="-war" emerge --newuse @world

My shared code repository: https://code.pa4wdh.nl.eu.org
Music, Free as in Freedom: https://www.jamendo.com
Back to top
View user's profile Send private message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1523

PostPosted: Tue Apr 22, 2014 6:53 pm    Post subject: Reply with quote

well, local user ftp works fine here are the lines I added to the config:
local_enable=YES
local_root=/media/raid

and my new fstab line:
curlftpfs#pc /media/pc fuse noauto,allow_other,uid=1000,gid=1000,umask=022,user=adel:<password> 0 0
where <password> is adel's password

thanks pa4wdh
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum