FTP server does not allow .htaccess file upload

I am using Amazon EC2 server. Set up your Ubuntu system and ProFTPD server. Then I create a user to upload files. It is working.

But I can not download the .htaccess file. It returns the following error:

Response: 257 "/public_html" is the current directory Command: TYPE A Response: 200 Type set to A Command: PORT 192,168,1,2,200,20 Response: 200 PORT command successful Command: STOR .htaccess Response: 550 .htaccess: Permission denied Error: Critical error Status: Disconnected from server 

I manage things through webmin and through Terminal via ssh. I tried the following steps:

DenyFilter *. * / (Commented on this line in the FTP configuration file)

Added GLOBAL: ListOptions "-la"

But nothing works.

Interestingly, I can upload the .htaccess file to directories other than "public_html" ..

+4
source share
1 answer

I had the same problem lately, and in the end it was fixed just renaming the file for the purpose of downloading (e.g. .htaccess-new) and then renaming it back to .htaccess on the real server.

Be sure to keep a backup of the original file and make sure that the permissions on the files match the original (or everything that you might need is set.)

+6
source

Source: https://habr.com/ru/post/1347121/


All Articles