Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Networking & Security
  • Search

cannot upload files to ftp server(vsftpd)

Having problems getting connected to the internet or running a server? Wondering about securing your box? Ask here.
Post Reply
Advanced search
8 posts • Page 1 of 1
Author
Message
Adel Ahmed
Veteran
Veteran
Posts: 1616
Joined: Fri Sep 21, 2012 7:59 am

cannot upload files to ftp server(vsftpd)

  • Quote

Post by Adel Ahmed » Sat Apr 12, 2014 11:44 am

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
Top
gerdesj
l33t
l33t
User avatar
Posts: 622
Joined: Thu Sep 29, 2005 1:44 pm
Location: Yeovil, Somerset, UK
Contact:
Contact gerdesj
Website

Re: cannot upload files to ftp server(vsftpd)

  • Quote

Post by gerdesj » Sat Apr 12, 2014 4:22 pm

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
Top
Adel Ahmed
Veteran
Veteran
Posts: 1616
Joined: Fri Sep 21, 2012 7:59 am

  • Quote

Post by Adel Ahmed » Sat Apr 12, 2014 6:16 pm

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
Top
gerdesj
l33t
l33t
User avatar
Posts: 622
Joined: Thu Sep 29, 2005 1:44 pm
Location: Yeovil, Somerset, UK
Contact:
Contact gerdesj
Website

  • Quote

Post by gerdesj » Sun Apr 13, 2014 9:45 pm

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
Top
Adel Ahmed
Veteran
Veteran
Posts: 1616
Joined: Fri Sep 21, 2012 7:59 am

  • Quote

Post by Adel Ahmed » Thu Apr 17, 2014 12:04 pm

thanks
I appreciate your help
Top
Adel Ahmed
Veteran
Veteran
Posts: 1616
Joined: Fri Sep 21, 2012 7:59 am

  • Quote

Post by Adel Ahmed » Mon Apr 21, 2014 6:27 am

help anyone?
Top
pa4wdh
Veteran
Veteran
Posts: 1015
Joined: Fri Dec 16, 2005 6:55 pm

  • Quote

Post by pa4wdh » Mon Apr 21, 2014 9:24 am

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
Top
Adel Ahmed
Veteran
Veteran
Posts: 1616
Joined: Fri Sep 21, 2012 7:59 am

  • Quote

Post by Adel Ahmed » Tue Apr 22, 2014 6:53 pm

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
Top
Post Reply

8 posts • Page 1 of 1

Return to “Networking & Security”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic