FTP Issues: Can't upload files via ftp and new ftp user having the same problem.

27 posts / 0 new
Last post
#1 Wed, 02/05/2014 - 16:42

FTP Issues: Can't upload files via ftp and new ftp user having the same problem.

Hello, new user here.

I have 2 issues. First, I installed the webmin/usermin/virtualmin stack from the install script on the latest version of Debian with no poblems. I created a virtual server in virtualmin for my domain and the user I created can connect via ftp in dreamweaver and filezilla but cannot upload any files.

For example, the user I created while creating the virtual server in Virtualmin is named Bob, and he can't modify and upload the index.html in dreamweaver. I've manually changed the permisssion of index.html and the public_html folder to give him write privileges but he still cannot write and upload any files in dreamweaver, although he can write files just fine from the debian terminal.

The dreamweaver error: is public_html\index.html - error occurred - An FTP error occurred - cannot put index.html. Access denied. The file may not exist, or there could be a permission problem. Make sure you have proper authorizati...

Strangely enough, If i create a file in dreamweaver and try to upload it, I get the above error, but if I look through my debian terminal, I can see that the file is in fact there. For example, I can create an index.html on dreamweaver but can't upload it without getting the above error; if I look through my debian terminal, I can see that the index.html has been uploaded even though I received the error; however, any attempts to modify the file in dreamweaver and upload it are all blocked with the error and no changes are made to debian. In summation, I can't write files at all through DW, nor can I upload officially, but there's this strange phenomenon where newly created template files are being uploaded when they shouldn't be (because I'm receiving the above error).

My 2nd issue is that if I create an FTP web access user, he is having the same problem of not being able to modify and upload any files.

I've been struggling with this issue for a few days now and I'm at my wit's end, which is why I've decided to seek help. Please help!!

Kind Regards,

  • Tony
Wed, 02/05/2014 - 17:20


You would definitely want to use a "Website access FTP User" for your FTP user, it won't work without that.

Once you have a website access ftp user, if you continue to see issues uploading files, then you may have additional permissions issues on the files or directories.

You may want to go into your public_html folder, and run "ls -la", and review the owner and group to make sure it's owned by the Virtual Server owner, and not another user such as root.


Wed, 02/05/2014 - 18:53


Thanks for your quick reply. The user I created when I created the virtual server through Virtualmin is named Bob. Checking my debian terminal, I can see that Bob is both the owner and group name and he owns the publc_html folder and files.

I created a Website Access FTP user named Billy but Billy is having the same problems as Bob.

Bob also has write privileges for the index.html but can only change files from the terminal and not through Dreamweaver, which is my primary editing software.

Any more ideas I can check out?

Eric, is there a linux distro that the Virtualmin/usermin/webmin stack works the best on? As I mentioned, I'm using debian but would swich to cent os or any other if it will be a smoother out for me.


Thu, 02/06/2014 - 00:03


The distro you're using should work great -- when using a website FTP access user on any supported distro, what you're doing should work perfectly.

Could you go into the public_html folder, and run this command:

ls -la

Perhaps that will help shed some light on what's going on there... thanks!


Thu, 02/06/2014 - 04:29

Can your FTP client generate a transcript of the commands it executes and the replies it gets? The respective error messages might give a clue what's going wrong.

Note that to access a file, you don't just need write access to that file, but to the whole path leading to it, e.g. to /home, /home/DOMAINDIR and /home/DOMAINDIR/public_html. I.e. the permissions and ownership of all those must be set correctly.

Thu, 02/06/2014 - 21:19

@ Eric, the files in there were writable and i still had no luck.

@ Locutus, my home/bob folder only had read and execute privileges.. i think this was the problem. Even though I made public_html and its files writable, the main bob folder was only read and execute so it didn't carry over...

Do you know how I can give the user Bob write privileges? And since he didn't have write priviliges, the ftp web access user, billy, also inherited the lack of write privileges?

I searched the web for like 4 days and I still can't figure it out.

I'm playing around with centOS as well to see if things might be smoother.

Thanks guys!

Kind Regards.

Thu, 02/06/2014 - 21:28


I'm able to ftp in on my new CentoOS build and i'm able to write files and upload files, so that issue is solved for me on Cent OS, but when I visit the site example.com in my browser, I only see:

Index of /

Name Last Modified Size Description

Apache/2.2.15 (Centos) Server at example.com Port 80

and when I visit example.com/index.html, I only see:

Not Found

The requested URL /index.html was not found on this server.

Any idea what the problem might be?

Thanks guys!

Thu, 02/06/2014 - 22:32


If you've uploaded an index.html file into the public_html folder, but it's saying it can't find it -- check the access log in $HOME/logs/access_log to see if you see the incoming connection attempt.

If not, then you have an issue where it's accessing the wrong website.

For some steps on how to troubleshoot that, check out the section titled "The wrong website shows up" in the following document:


Tue, 02/11/2014 - 00:28 (Reply to #8)


I'm totally lost right now. Can i post images of my configuration and you take a peek and let me know if it looks ok?

Thanks in advance.

Kind Regards,

Tony B.

Tue, 02/11/2014 - 09:01

If the wrong website is showing up, that means Apache may be configured with the wrong IP address.

What is the output of the command "/sbin/ifconfig"?

And then, what output do you receive if you run this command:

grep -i virtualhost /etc/httpd/conf/httpd.conf

That'll provide a good starting point for determining the source of the problem.


Tue, 02/11/2014 - 15:27 (Reply to #10)


I've attached a word doc that contains the output of the commands you requested. I also placed the output of some other relevant info to help expedite the process.

Please download the word doc and check out my config and let me know if anything needs altering. (Note: I changed the external IP and site name to shield the identity).

Thanks Eric, We're really close. Just a tweak here and there and I think we have it. I'm looking forward to becoming a real webmin user!

Kind Regards,

Tony B.

Thu, 02/13/2014 - 15:43 (Reply to #11)

Hi Eric et al,

   Just following up to see if you saw my previous post regarding my webmin build.  I know I sent a lot of info your way, so I want to make sure you have enough time to digest it.

If you can figure out where my mistakes are and point me in the right direction, I'd be elated! Even though I'm a novice, I learn more and more every day and I'm close to getting it working so I'm excited about it.

I'm looking forward to getting rocking with webmin/virtualmin!

Thanks so much for your time and wisdom.

Kind Regards,


Thu, 02/13/2014 - 16:32

I took a quick look at the document, and I suppose Eric will need a while to get back to you. Considering how long and extensive it is, he'll probably need a while to go through all of it.

Thu, 02/13/2014 - 20:01 (Reply to #13)

thanks locutus! He can take as much time as he needs for I am a patient person ;) I appreciate all the fine work you guys are doing over there.. you're a lifesaver!

Kind Regards,


Fri, 02/21/2014 - 00:10

Hey guys,

Just wondering if you guys had any ideas about how I can get this thing to work?

I know I sent a lot of info your way in that document, sorry about that.. I just figured that if I gave you a lot of info, it might help explain what is going on by giving you a big picture of my build. I guess I was hoping to expedite the process by giving you all the details.

Any thoughts? Am I on the wrong track/right track? Any advice or tips for me?

Thanks so much guys. I really appreciate all your help and expertise. Keep up the great work virtualmin team!

Kind Regards,

  • Tony B.
Fri, 02/21/2014 - 09:21


It looks like your Apache config is correct -- the IP addresses in it match the network interfaces on your system.

So it first glance, it appears that Apache may be working properly.

When you uploaded the index.html file -- was that uploaded into the public_html folder of your domain? The web files would need to exist within the public_html folder to be accessible from a web browser.

Also, if you look at $HOME/logs/access_log after trying to access the index.html file, do you see a log entry containing the attempt to access that file? If so, can you paste that in here?


Sat, 02/22/2014 - 22:55


I booted up my server and magically everything was working perfectly, I was able to view my index.html externally (dns working) and ftp was also working. I was so happy that everything was working, so I decided to change the folder name of the VM so that I could back it up on my other hard drive- big mistake!

Upon changing the name of the folder of the VM, my eth0 changed to eth1 and my ip automatically changed causing everything to get messed up.

I followed the advice in this link:http://www.cyberciti.biz/tips/vmware-linux-lost-eth0-after-cloning-image...

So i followed the steps in that link and also removed HWADDR from ifcfg-eth0, and then when i rebooted, it reverted back to eth0 just like it was before, my IP went back to normal, thereby once again making my site visible externally again.

Unfortunately, in the process, I've totally lost ftp access.

I've attached some printouts in a word doc in regard to the ftp issues:

proftpd -td10



I've also confirmed that proftpd is running and port 21 is open.

It's frustrating because I finally got everything working, including full FTP access, and I tried to do the responsible thing by backing everything up and now I can't FTP at all.

Please help Eric, I'm so close at this point! I just had it working perfectly! I didn't know that changing the folder name of the VM would be such a disaster!

Kind Regards,

Tony B.

Sun, 02/23/2014 - 05:00

What's the "VM folder", and how does that affect the network interface? Are you using some kind of virtualization software? Normally, your eth0 would only change to eth1 if your network card got a different MAC address for some reason. But even if so, that should not affect the interface(s) that ProFTPD listens on.

Seems your ProFTPD is now listening only on the localhost interface. What output do you get for:

ifconfig -a
netstat -tpln | grep :21

Please put the output here in the forum in [code][/code] tags, and not in a Word document.

In Webmin, what's your setting for "Webmin -> Servers -> ProFTPD -> Virtual Servers: Default Server -> Networking Options -> Bind to address"?

Sun, 02/23/2014 - 13:15 (Reply to #18)


My CentOS server is on a VMWare VM and for some reason the eth0 changed to eth1 and all hell broke lose. Luckily, I found a fix in that link I posted in my previous post, but for some reason, I lost my ability to ftp.

The ifconfig -a output:

eth0      Link encap:Ethernet  HWaddr 00:0C:29:DC:32:4B  
          inet addr:  Bcast:  Mask:
          inet6 addr: fe80::20c:29ff:fedc:324b/64 Scope:Link
          RX packets:334 errors:0 dropped:0 overruns:0 frame:0
          TX packets:315 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:163255 (159.4 KiB)  TX bytes:26970 (26.3 KiB)
lo        Link encap:Local Loopback  
          inet addr:  Mask:
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:64 errors:0 dropped:0 overruns:0 frame:0
          TX packets:64 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:7697 (7.5 KiB)  TX bytes:7697 (7.5 KiB)

Output for: netstat -tpln | grep :21

tcp        0      0 :::21                       :::*                        LISTEN      2227/proftpd        -                   

The setting for "Webmin -> Servers -> ProFTPD -> Virtual Servers: Default Server -> Networking Options -> Bind to address" has the radio button on the left side to the left of All Addresses.

Locutus, it is strange that my eth0 somehow changed to eth1, but it's back to eth0 for now. If you need any more outputs definitely, let me know. We're so close!

Kind Regards,


Sun, 02/23/2014 - 13:14

Okay, according to netstat your ProFTPD should be listening on all addresses. You might try just restarting it and see what happens.

Can you connect from your LAN to the FTPD? Maybe it's a matter of proper port forwarding, since you seem to be operating behind a NAT (which induces a number of caveats and increases complexity).

Otherwise please elaborate the exact problem you're having right now.

Sun, 02/23/2014 - 14:06 (Reply to #20)

I don't think it's related to the firewall/portforwarding, since I have my server in the DMZ temporarily while testing and I've disabled the CentOS firewall. Actually, all my firewall/router settings are the same ones that resulted in the successful ftp sessions I had yesterday (it was working perfectly, I was able to upload files, edit files.. I had multiple sessions going, it was working flawlessly). I can also confirm that port 21 is open.

I'm connecting from the host computer on the LAN to the VM/CentOS Server.

The exact problem is that when I go to Dreamweaver or filezilla, I can't connect. I get the standard connection refused for both programs. I'm using the same dreamweaver/filezilla settings that were working before this whole eth0 to eth1 fiasco.

So, same firewall settings, same ftp settings and no luck. As soon as I changed back from eth1 to eth0, the first thing I did was retest the ftp and got the connection refused error, so something changed when I went from eth0 to eth1 and then back to eth0... some file must have gotten modified somewhere.

I've also created an ftp user, but he can't connect either.

This is a strange phenomenon indeed. On the bright side, the dns is still working great, I'm able to visit my domain externally, just need to solve the ftp issue.

I'm willing to try anything at this point, since I had it working yesterday. If you come up with some new tests, I will try them.

Thank Locutus, appreciate all your help.

Sun, 02/23/2014 - 14:21 (Reply to #21)

Here's a recent output of /var/log/messages:

Feb 23 11:34:18 examplehost rsyslogd: [origin software="rsyslogd" swVersion="5.8.10" x-pid="1488" x-info="http://www.rsyslog.com"] rsyslogd was HUPed
Feb 23 11:34:49 examplehost proftpd[6485]: (::ffff:[::ffff:]) - FTP session opened.
Feb 23 11:34:49 examplehost proftpd[6485]: (::ffff:[::ffff:]) - FTP session closed.
Feb 23 11:41:01 examplehost proftpd[6764]: (::ffff:[::ffff:]) - FTP session opened.
Feb 23 11:41:01 examplehost proftpd[6764]: (::ffff:[::ffff:]) - FTP session closed.
Feb 23 11:41:13 examplehost clamd[1861]: SelfCheck: Database modification detected. Forcing reload.
Feb 23 11:41:13 examplehost clamd[1861]: Reading databases from /var/lib/clamav
Feb 23 11:41:20 examplehost clamd[1861]: Database correctly reloaded (3131257 signatures)
Feb 23 11:41:51 examplehost proftpd[6859]: (::ffff:[::ffff:]) - FTP session opened.
Feb 23 11:41:51 examplehost proftpd[6859]: (::ffff:[::ffff:]) - FTP session closed.
Feb 23 11:55:47 examplehost proftpd[7287]: (::ffff:[::ffff:]) - FTP session opened.
Feb 23 11:55:47 examplehost proftpd[7287]: (::ffff:[::ffff:]) - FTP session closed.
Feb 23 11:56:04 examplehost clamd[1861]: SelfCheck: Database status OK.
Sun, 02/23/2014 - 15:37

Okay, sorry I'm out of ideas what to test, remotely via the forum. The problem can have a number of reasons, and I'd need to see your system for myself, anything else is too much guesswork.

I could offer you a screen sharing / instant messenger session tomorrow. I can only do this for free if it doesn't take longer than about 30 minutes though, since I do this in my somewhat limited spare time. :) If you're not looking for paid support, the user "tpnsolutions" might be able and willing to do screen sharing for free.

Sun, 02/23/2014 - 16:42 (Reply to #23)

sure, I can do a screenshare. Give me a time, let me know what software you use and how to contact you and I will be there.

thanks locutus.

Sun, 02/23/2014 - 16:59 (Reply to #24)

Okies, we can use Teamviewer, I'm in timezone UTC+1. You can contact me on Skype, user "Loc2262". Can't say exactly yet when I'm free tomorrow, but we'll find a time. :)

Mon, 02/24/2014 - 04:01

Issue (for now) solved via screen sharing. As a reference for others:

The problem was that the user tried to connect to his server, which is in his LAN and reachable from the outside via a NAT router, from the LAN via the external IP.

His router does not perform port forwarding from the LAN (or we could not find the setting to turn that on -- I know that e.g. pfSense can do that, it's called "NAT reflection"), so that didn't work. By simply using the LAN IP of the server, the issue vanished. :)

Mon, 02/24/2014 - 19:35

I can't thank you guys enough! We used the LAN IP of the server and it worked fine.

Locutus, you did an outstanding job in not only solving the problem but helping me in general... I learned so much.

Thanks so much!

KInd Regards.

Topic locked