553 ошибка ftp

FTP error 553 is one of the typical errors that we come across while uploading files via FTP.

This is generally caused due to the incorrect permissions set to the files. Or else the FTP clients like vsftpd do not allow any upload.

At Bobcares, we often receive requests to fix FTP errors as a part of our Server Management Services.

Today, let’s discuss this 553 error in FTP and see how our Support Engineers fix it.

What does FTP error 553 indicate?

The error 553 indicates that requested action not taken or File name not allowed.

Generally, the error 533 shows up while uploading any files in the FTP. Again various FTP clients show different variants of the error message. For instance, FTP command prompt error appears as:

ftp> put /home/user/Desktop/FTP/2.jpg
local: /home/user/Desktop/FTP/2.jpg remote: /home/user/Desktop/FTP/2.jpg
227 Entering Passive Mode (192,xx,134,131,24,92).
553 Could not create file.
ftp>

Causes for FTP error 553

Let’s now check on the major causes for 553 errors in FTP.

1. Incorrect permissions

Quite often, FTP error 553 can occur due to bad permissions set to the files and folders.

If the uploading files do not have write permissions, then it will end up with errors.

It is very essential to have the write permissions set to the files so that we can make changes to the file by uploading any contents to it. Additionally, the user should have enough privileges to write the files to the destination directory too.

2. Errors in the configuration of vsftp

This error also occurs due to incorrect configuration of FTP clients like Vsftp. In other words, any incorrect information set in the configuration file results in such errors.

For example, the value of write_enable in the vsftpd.conf must be set to true to allow writing. However, by default, it is set to false. This creates problems and ends up in 553 errors.

We normally, make sure that the FTP client configuration is set properly with the proper details.

How we fix FTP error 553?

Having a decade of expertise in server management, our Support Engineers are familiar with these FTP errors.

Let’s now discuss different scenarios where we experienced this error and how we fix it.

1. Check the permissions and ownership to fix FTP error 553

One of our customers recently created a user and was successfully connected to FTP. But, while trying to upload some contents into the account, they got an error

229 Entering Extended Passive Mode (|||12011|).
553 Could not create file.

Our Support Engineers started troubleshooting the error by checking the permissions of the file. We could see that the permissions were set right.

So, then we tried to change the ownership of the folder to which customer was trying to upload the contents using the command:

chown USER:GROUP folder_name

Finally, after this change, the customer was able to upload the contents successfully.

2. Incorrect value in the configuration file.

Recently, one of our customers approached with an error message

553 Could not create file

Our Support Engineers started troubleshooting the error by checking the permissions of the files. We found that the permissions were all set right.

Later we went checking for the configuration file vsftpd.conf.

Here, we found the below line

guest_enable=YES

If this guest_enable is set to YES, then it will throw 553 Could not create file error.

So, we set the guest_enable value to NO.

This is because the FTP server will consider all the logins as a guest login. As a result, it will end up throwing error messages.

Finally, this fixed the error after changing the value of guest_enable from YES to NO.

[Still experiencing errors with FTP? – We’ll help you]

Conclusion

In short, the FTP error 553 occurs mainly due to the improper permissions set to the file and due to the incorrect details in the FTP client configuration. Today, we saw how our Support Engineers fix this error.

nano /etc/vsftpd.conf

# modify these lines
write_enable=YES
chroot_local_user=YES

# add these lines
userlist_enable=YES
userlist_file=/etc/vsftpd.userlist

add the user to /etc/vsftpd.userlist

usermod --home /var/www/html/ username
chown -R username /var/www/html
chmod -R 755 /var/www/html

7 is user, 5 is group, 5 is other

7 is binary 111, 5 is binary 101

111 = read (yes), write (yes), execute (yes)

101 = read (yes), write (no), execute (yes)

So, the user can read, write, execute but other people can’t write.

I need to FTP a file to a directory. In .Net I have to use a file on the destination folder to create a connection so I manually put Blank.dat on the server using FTP. I checked the access (ls -l) and it is -rw-r—r—. But when I attempt to connect to the FTP folder I get: «The remote server returned an error: (553) File name not allowed» back from the server. The research I have done says that this may arrise from a permissions issue but as I have said I have permissions to view the file and can run ls from the folder. What other reasons could cause this issue and is there a way to connect to the folder without having to specify a file?

            byte[] buffer;
            Stream reqStream;
            FileStream stream;
            FtpWebResponse response;
            FtpWebRequest request = (FtpWebRequest)FtpWebRequest.Create(new Uri(string.Format("ftp://{0}/{1}", SRV, DIR)));
            request.Method = WebRequestMethods.Ftp.UploadFile;
            request.Credentials = new NetworkCredential(UID, PASS);
            request.UseBinary = true;
            request.Timeout = 60000 * 2;
            for (int fl = 0; fl < files.Length; fl++)
            {
                request.KeepAlive = (files.Length != fl);
                stream = File.OpenRead(Path.Combine(dir, files[fl]));
                reqStream = request.GetRequestStream();
                buffer = new byte[4096 * 2];
                int nRead = 0;
                while ((nRead = stream.Read(buffer, 0, buffer.Length)) != 0)
                {
                    reqStream.Write(buffer, 0, nRead);
                }
                stream.Close();
                reqStream.Close();

                response = (FtpWebResponse)request.GetResponse();
                response.Close();
            }

asked Feb 23, 2012 at 17:50

NomadicDeveloper's user avatar

NomadicDeveloperNomadicDeveloper

8474 gold badges17 silver badges29 bronze badges

2

Although replying to an old post just thought it might help someone.

When you create your ftp url make sure you are not including the default directory for that login.

for example this was the path which I was specifying and i was getting the exception 553 FileName not allowed exception

ftp://myftpip/gold/central_p2/inbound/article_list/jobs/abc.txt

The login which i used had the default directory gold/central_p2.so the supplied url became invalid as it was trying to locate the whole path in the default directory.I amended my url string accordingly and was able to get rid of the exception.

my amended url looked like

ftp://myftpip/inbound/article_list/jobs/abc.txt

Thanks,

Sab

answered Jul 27, 2012 at 15:20

user1131926's user avatar

4

This may help for Linux FTP server.

So, Linux FTP servers unlike IIS don’t have common FTP root directory. Instead, when you log on to FTP server under some user’s credentials, this user’s root directory is used. So FTP directory hierarchy starts from /root/ for root user and from /home/username for others.

So, if you need to query a file not relative to user account home directory, but relative to file system root, add an extra / after server name. Resulting URL will look like:

ftp://servername.net//var/lalala

answered Mar 4, 2013 at 11:24

Darth Jurassic's user avatar

1

You must be careful with names and paths:

 string FTP_Server = @"ftp://ftp.computersoft.com//JohnSmith/";
 string myFile="text1.txt";
 string myDir=@"D:/Texts/Temp/";

if you are sending to ftp.computersoft.com/JohnSmith a file caled text1.txt located at d:/texts/temp

then

    FtpWebRequest request = (FtpWebRequest)WebRequest.Create(FTP_Server+myFile);
    request.Method = WebRequestMethods.Ftp.UploadFile;                      

    request.Credentials = new NetworkCredential(FTP_User, FTP_Password);    

    StreamReader sourceStream = new StreamReader(TempDir+myFile);                  
    byte[] fileContents = Encoding.UTF8.GetBytes(sourceStream.ReadToEnd());
    sourceStream.Close();

    Stream requestStream = request.GetRequestStream();
    requestStream.Write(fileContents, 0, fileContents.Length);              
    requestStream.Close();

notice that at one moment you use as destination

ftp://ftp.computersoft.com//JohnSmith/text1.txt

which contains not only directory but the new file name at FTP server as well (which in general can be different than the name of file on you hard drive)

and at other place you use as source

D:/Texts/Temp/text1.txt

answered Nov 13, 2013 at 14:34

RRM's user avatar

RRMRRM

3,3637 gold badges25 silver badges40 bronze badges

your directory has access limit.
delete your directory and then create again with this code:

//create folder  
FtpWebRequest request = (FtpWebRequest)FtpWebRequest.Create("ftp://mpy1.vvs.ir/Subs/sub2");
request.Method = WebRequestMethods.Ftp.MakeDirectory;
request.Credentials = new NetworkCredential(username, password);
request.UsePassive = true;
request.UseBinary = true;
request.KeepAlive = true ;
using (var resp = (FtpWebResponse)request.GetResponse())
{

}

VMAtm's user avatar

VMAtm

27.9k17 gold badges79 silver badges125 bronze badges

answered Jul 28, 2014 at 7:05

aliastitan's user avatar

1

I saw something similar to this a while back, it turned out to be the fact that I was trying to connect to an internal iis ftp server that was secured using Active Directory.

In my network credentials I was using new NetworkCredential(@»domainuser», «password»); and that was failing. Switching to new NetworkCredential(«user», «password», «domain»); worked for me.

answered Feb 23, 2012 at 18:14

Fen's user avatar

FenFen

9335 silver badges13 bronze badges

1

I hope this will be helpful for someone

if you are using LINUX server, replace your request path from

FtpWebRequest req= (FtpWebRequest)WebRequest.Create(@"ftp://yourdomain.com//yourpath/" + filename);

to

FtpWebRequest req= (FtpWebRequest)WebRequest.Create(@"ftp://yourdomain.com//public_html/folderpath/" + filename);

the folder path is how you see in the server(ex: cpanel)

answered Aug 24, 2018 at 10:47

Znaneswar's user avatar

ZnaneswarZnaneswar

3,3192 gold badges15 silver badges24 bronze badges

Although it’s an older post I thought it would be good to share my experience. I came faced the same problem however I solved it myself. The main 2 reasons of this problem is Error in path (if your permissions are correct) happens when your ftp path is wrong. Without seeing your path it is impossible to say what’s wrong but one must remember the things

a. Unlike browser FTP doesn't accept some special characters like ~
b. If you have several user accounts under same IP, do not include username or the word "home" in path
c. Don't forget to include "public_html" in the path (normally you need to access the contents of public_html only) otherwise you may end up in a bottomless pit

answered Jan 1, 2015 at 8:36

Bibaswann Bandyopadhyay's user avatar

Another reason for this error could be that the FTP server is case sensitive. That took me good while to figure out.

answered Mar 2, 2017 at 5:14

Evan Barke's user avatar

Evan BarkeEvan Barke

991 silver badge13 bronze badges

I had this problem when I tried to write to the FTP site’s root directory pro grammatically. When I repeated the operation manually, the FTP automatically rerouted me to a sub-directory and completed the write operation. I then changed my code to prefix the target filename with the sub-directory and the operation was successful.

answered Mar 22, 2018 at 1:56

CAK2's user avatar

CAK2CAK2

1,8321 gold badge15 silver badges17 bronze badges

Mine was as simple as a file name collision. A previous file hadn’t been sent to an archive folder so we tried to send it again. Got the 553 because it wouldn’t overwrite the existing file.

answered Dec 26, 2019 at 21:10

Jeffrey Roy's user avatar

Check disk space on the remote server first.
I had the same issue and found out it was because the remote server i was attempting to upload files to had run out of disk space on the partition or filessytem.

answered Jan 28, 2021 at 9:57

Checkiablue's user avatar

To whom it concerns…

I’ve been stuck for a long time with this problem.
I tried to upload a file onto my web server like that:

  • Say that my domain is www.mydomain.com.
  • I wanted to upload to a subdomain which is order.mydomain.com, so I’ve used:

FtpWebRequest ftpReq = (FtpWebRequest)WebRequest.Create($@"ftp://order.mydomain.com//uploads/{FileName}");

  • After many tries and getting this 553 error, I found out that I must make the FTP request refer to the main domain not the sub domain and to include the subdomain as a subfolder (which is normally created when creating subdomains).
  • As I’ve created my subdomain subfolder out of the public_html (at the root), so I’ve changed the FTP Request to:

FtpWebRequest ftpReq = (FtpWebRequest)WebRequest.Create($@"ftp://www.mydomain.com//order.mydomain.com//uploads/{FileName}");

And it finally worked.

Dharman's user avatar

Dharman

30.4k22 gold badges84 silver badges132 bronze badges

answered Jun 21, 2021 at 14:43

Ahmed Suror's user avatar

Ahmed SurorAhmed Suror

4275 silver badges17 bronze badges

Fresh LAMP server setup with Ubuntu 12.04 and VSFTPD.

I’m trying to access the /var/www folder (web root) with FTP user.

I created a new user ftpuser and added it to the www-data user group created automatically by Apache.
Home directory of that user is set to /var/www.
I also changed the ownership of the /var/www to www-data group and changed permissions to 02775.

However, I’m still not able to upload files. Error is: «553 Could not create file».

  1. Can someone please explain me how to set these permissions properly?
  2. What is the correct setup? Should I set the home directory of ftpuser to /var/www or somehow diffeerently?

I found a lot of topics on the web but none of them offer a universal solution.

Thank you!


UPDATE:

Here is the output of ls -l of /var/www:

drwxr-sr-x 3 root ftpuser 4096

Content of vsftpd.conf file:

listen=YES
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=YES
connect_from_port_20=YES
chown_uploads=YES
chown_username=ftpuser
chroot_local_user=YES
secure_chroot_dir=/var/run/vsftpd/empty
pam_service_name=vsftpd
rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key

qbi's user avatar

qbi

18.8k9 gold badges78 silver badges127 bronze badges

asked Feb 19, 2013 at 6:58

Aram Boyajyan's user avatar

3

The problem is because your folder is owned by root, instead of ftpuser.

To fix it run:

sudo chown -R ftpuser:nogroup /var/www/ftuuserfolder

gertvdijk's user avatar

gertvdijk

66.6k33 gold badges185 silver badges282 bronze badges

answered Jul 15, 2013 at 6:28

Amin Y's user avatar

Amin YAmin Y

3063 silver badges4 bronze badges

0

I found I had set the correct ownership, but not the correct permissions.


If your folder is owned by the user ‘ftpuser’ and group ‘www-data’ for example, like…

drwxr-sr-x 3 ftpuser www-data 4096

Then you probably haven’t run…

sudo chmod -R g+w /var/www/ftpuserfolder

Which gives write permission to the group that owns those files/folders.

answered Apr 12, 2018 at 12:33

Crimbo's user avatar

CrimboCrimbo

5791 gold badge5 silver badges14 bronze badges

For me nothing worked. I figured out that the initial directory in my FTP Client was set to nothing, so it tried to access the linux root directory. I was letting it empty first, because I thought it will pick the users home directory.

I had to specify the full path to the project.

answered Sep 1, 2021 at 14:35

Black's user avatar

BlackBlack

7641 gold badge7 silver badges16 bronze badges

FTP error 553 is one of the ordinary missteps that we go over while moving records through FTP. Errors on your WordPress site can tone down your work and make real weights for both you and your customers.

For instance, the “Foundation failed: couldn’t make list” message can hold you back from giving an essential component or handiness. This is generally caused on account of some improper approvals set to the records. “FTP Could Not Create File”, Or on the other hand, no doubt the FTP clients like vsftpd don’t allow any exchange.

Around here at ARZHOST, we routinely get sales to fix FTP errors as a piece of our Server Management Services. Today, we should discuss this 553 screw-up in FTP and see how our Hosting Expert Planners fix it.

What does FTP error 553 illustrate?

“FTP Could Not Create File”, The error 553 exhibits that referenced move not made or File name not allowed.

Generally, the screw-up 533 shows up while moving any records in the FTP. Again unique FTP clients show different varieties of the error message. For instance, FTP request brief error appears as:

  • ftp> put/home/customer/Desktop/FTP/2.jpg
  • close by:/home/customer/Desktop/FTP/2.jpg remote:/home/customer/Desktop/FTP/2.jpg
  • 227 Entering Passive Mode (192, xx, 134,131,24,92).
  • 553 Could not make the report.
  • ftp>

Presenting a New Theme or Plugin on Your Site

Your WordPress site is included two sections: an informational collection and various reports that are taken care of on a server in ‘indexes.’ When you use WordPress overseer to add a theme or module to your site, it needs to make another vault where to save its records.

Regardless, if the module or subject you’re trying to explain doesn’t have approval with write in your site’s root record. I won’t have a choice to finish this work. That is where you’ll see an error, for instance. “FTP Could Not Create File”, “Foundation failed: couldn’t make vault.”

This error is your server’s strategy for saying that you’re not allowed to make changes to your site’s reports by adding the module or subject being referred to. All around, this is an issue that typically occurs on new WordPress objections.

Note that there is a practically identical, more surprising justification behind this error. Accepting that your server is running out of plate space to store your site’s records. “FTP Could Not Create File”, may show this identical message since it has no space for the new module or subject.

Stimulating an Existing Theme or Plugin

Every so often, when attempting to upgrade a WordPress subject or module that is at this point presented on your site, you may see an error as old as one we’ve shown beforehand. This one will routinely examine, “Update failed: couldn’t make vault.”

This issue occurs for the same reasons as the “Foundation failed couldn’t make file.” error. Right when you update a WordPress module or subject, WordPress needs to change its records on your site’s server. If your assents settings are off base or there isn’t adequate free space, the cycle cannot get aside reports or move new ones.

Since the justification for these two issues is almost identical, the courses of action are unclear as well. “FTP Could Not Create File”, Any systems for settling the “Foundation failed: couldn’t make list” error recorded underneath should similarly work for a dialed back to update.

Moving Files to the wp-content directory

Server report approvals are security incorporates that working with providers put to prevent unapproved parties from making changes to your site or taking fragile information. Still, they can once in a while keep you out of your records if they aren’t set viably.

This is the explanation, expecting you endeavor to get around the “Foundation failed: couldn’t make list.” error in your WordPress dashboard by moving the module’s or then again subject’s archives clearly to the wp-content list on your server, you’ll likely still experience a comparable issue. The error occurs considering an issue with your server, not your WordPress foundation.

This issue may moreover loosen up to your wp-content/moves subdirectory, where all of your media archives are taken care of. Adding pictures, accounts, or relative substance to your site by saving them to your server follows a comparable connection as presenting another module or subject.

Accepting you don’t have the approval to write in your root library, moving substance to wp-content/moves will regardless convey the error we’ve been looking at. “FTP Could Not Create File”, To fix it, you’ll need to change your server’s settings, as we’ll depict rapidly.



People Also Ask

Question # 1: Where are vsftpd files stored?

Answer: Of course, vsftpd searches for this record at the area/and so forth/vsftpd. conf. Notwithstanding, you might abrogate this by indicating an order line contention to vsftpd. The order line contention is the pathname of the setup record for vsftpd.

Question # 2: Where does FTP get put files?

Answer: Whenever you are signed in, your present working registry is the distant client home index. When downloading records with the FTP order, the documents will be downloaded to the index from which you composed the FTP order. Assuming you need to download the records to another neighborhood index, change to it by utilizing the LCD orders.

Question # 3: Why is FTP connection refused?

Answer: The client’s Windows Firewall is impeding the port. The FTP customer is not designed for the right host data. The FTP customer is not designed for the right port. Assuming that the Server network is designed to just permit explicit IP locations to associate, the client’s IP address has not been added.

Read More ———

Question # 4: What is an FTP server used for?

Answer: In the least complex of definitions, an FTP Server (which represents File Transfer Protocol Server) is a product application that empowers the exchange of documents starting with one PC then onto the next. FTP is a method for moving records to any PC on the planet that is associated with the web.

Question # 5: What communications model does FTP use?

Answer: customer server model design

The File Transfer Protocol (FTP) is a standard correspondence convention utilized for the exchange of PC documents from a server to a customer on a PC organization. FTP is based on a customer server model design utilizing separate control and information associations between the customer and the server.



Purposes behind FTP error 553

We should now be careful with the significant purposes behind 553 errors in FTP.

1. Mistaken approvals

Usually, FTP error 553 can happen as a result of awful agrees set to the standards and envelopes. “FTP Could Not Create File”, If the moving records don’t have to make approvals, then, it will end up with errors.

It is very principal to have the form approvals set to the standards with the objective that we can make changes to the record by moving any substance to it. Moreover, the customer should enjoy enough benefits to forming the reports to the genuine list too.

2. Errors in the arrangement of vsftpd

This error also happens as a result of a mistaken course of action of FTP clients like Vsftp. By the day’s end, any off-base informational index in the planned archive brings about such errors.

For example, the value of write enables in the vsftpd. conf ought to be set to likely with license forming. Regardless, normally, it is set to sham. This makes issues and ends up in 553 errors.

“FTP Could Not Create File”, We normally, guarantee that the FTP client arrangement is set suitably with the true hints.

How do we fix FTP error 553?

Having a period of capacity in server the board, our Hosting Expert Planners are familiar with these FTP errors.

“FTP Could Not Create File”, We should now discuss different circumstances where we experienced this screw-up and how we fix it.

1. Check the approvals and ownership to fix FTP error 553

One of our customers made a customer and was viably connected with FTP. “FTP Could Not Create File”, However, while trying to move a couple of substances into the record, they got an error

  • 229 Entering Extended Passive Mode (|||12011|).
  • 553 Could not make the record.

Our Hosting Expert Planners started researching the error by truly studying the approvals of the archive. We could see that the approvals were fixed. Thusly, then, we tried to change the obligation regarding the coordinator to which customer was trying to move the substance using the request:

  • chown USER: GROUP folder name

Finally, after this change, the customer had the choice to move the substance sufficiently.

2. Mixed up worth in the arrangement record.

Lately, “FTP Could Not Create File”, one of our customers moved closer with a slip-up message

  • 553 Could not make the archive

Our Hosting Expert Planners started exploring the screw-up by really taking a gander at the approvals of the records. We saw that the agrees were all set right. Later we went checking for the arrangement record vsftpd. conf. Here, we considered the underneath line

  • guest enable=YES

Expecting this guest enable is set to YES, it will throw 553 Could not commit archive error. Thusly, we set the guest to enable value to NO. This is because the FTP server will consider all the logins as a guest login.

In this way, it will end up throwing error messages. “FTP Could Not Create File”, Finally, this good the error resulting to changing the value of guest enable from YES to NO.

Termination

To lay it out simply, the FTP error 553 happens for the most part in light of the improper approvals set to the archive and on account of the mistaken nuances in the FTP client arrangement.

Save time, costs and extend site performance with:

  • Second assistance from WordPress working with subject matter experts, the entire day, consistently.
  • Cloud flare Creativity joining.
  • The overall group reaches with 29 server ranches throughout the planet.
  • Smoothing out with our certain Application Performance Monitoring.

To choose whether a record approvals issue is causing a module or theme foundation error on your site. “FTP Could Not Create File”, You can use the Site Health tool or check out your server’s error log.

Starting there forward, resetting your assents using FTP/SFTP ought to simply require several minutes. Today, we saw how our Hosting Expert Planners fix this slip-up.

При редактировании/сохранении файла FileZilla выдает ошибку: «553 Could not create file».

На ДО стоит дебиан-сервер. Все отлично работало до изменения php.ini, но после его редактирования (upload_max_filesize) и перезагрузки сервера ФТП перестало работать.

UPD. Конфигурация vsftpd:

anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=002
anon_upload_enable=NO
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_std_format=YES
dual_log_enable=YES
chroot_local_user=YES
listen=YES
pam_service_name=vsftpd
userlist_enable=NO
tcp_wrappers=YES
force_dot_files=YES
ascii_upload_enable=YES
ascii_download_enable=YES
#allow_writable_chroot=YES
allow_writeable_chroot=YES
seccomp_sandbox=NO
pasv_enable=YES
pasv_max_port=12100
pasv_min_port=12000

THE INFORMATION IN THIS ARTICLE APPLIES TO:

  • CuteFTP® Home (All Versions)
  • CuteFTP Pro® (All Versions)

SYMPTOMS

When attempting to upload a file to the remote FTP site, a 553 error code is encountered, resulting in an error message similar to the following example:

COMMAND:> STOR your file.ext

STATUS:> Connecting FTP data socket… 192.168.0.1:21…

553 your file.ext: Permission denied.

ERROR:> Access denied.

CAUSE

This error is not caused by CuteFTP. The 553 error code is coming directly from the remote FTP server. The file name is not allowed.

Many FTP servers have restrictions on file names. If your file name contains special characters, symbols, or spaces in the file name, it might be rejected by the remote FTP server. In the example above, the file name was rejected because of a space. The remote FTP site may also be rejecting a particular file based on the file type or extension.

RESOLUTION

If your file name contains special characters, symbols, or spaces in the file name, you will need to rename it before you can upload the file. Rename the file using only alpha-numeric characters and no spaces. For more information, see Best Practices for Naming Files.

Note: If you change the file name, you may also need to change links in
your Web pages that point to that file name.

Share Article





On a scale of 1-5, please rate the helpfulness of this article

Optionally provide additional feedback to help us improve this article…

Thank you for your feedback!


Last Modified: 8 Years Ago


Last Modified By: kmarsh


Type: ERRMSG


Rated 2 stars based on 144 votes.


Article has been viewed 176K times.

Настроил на сервере ftp с помощью vsftpd. Конфиг следующий:

listen=YES
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
xferlog_enable=YES
xferlog_file=/var/log/vsftpd.log
xferlog_std_format=YES
connect_from_port_20=YES
idle_session_timeout=600
data_connection_timeout=60
ftpd_banner=###FTP###
allow_writeable_chroot=YES
chroot_local_user=YES
ascii_upload_enable=YES
ls_recurse_enable=YES
max_clients=20
secure_chroot_dir=/var/run/vsftpd
pam_service_name=vsftpd
rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key

Права на папку есть у локального пользователя, от которого присоединяюсь к ftp

drwxr-xr-x  2 maxftp maxftp 4.0K Mar 24 22:14 ftp

Коннект проходит

ftp <myip>
Connected to <myip>
220 Welcome to ftpd!
Name (): maxftp
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> 

Однако, при попытке записать файл получаю ошибку или таймаут

ftp> put Downloads/about 
local: Downloads/about remote: Downloads/about
200 PORT command successful. Consider using PASV.
553 Could not create file.

так получаю таймаут

curl -T Downloads/about ftp://<myip> --user <myuser>

что не учитываю или где допускаю ошибку?

  1. 22.07.2010, 22:08

    #1

    mutex вне форума


    Senior Member


    Регистрация
    18.07.2010
    Сообщений
    527

    По умолчанию Не могу редактировать файлы под root. Не работает FTP

    В менеджере файлов ISPmanager редактирую файлы под root, а изменения не видны. Через FTP начал загружать файлы в своим именем и в свою папку а мне регулярно ошибка. Раньше такого не было. В чем дело? Кто знает?

    Команда: STOR calc.php
    Ответ: 553 Could not create file.
    Ошибка: Критическая ошибка при передаче файлов

    ISPmanager 4.3.44.6
    CentOS 5.4 32bit


  2. 22.07.2010, 23:13

    #2

    xaker1 вне форума


    Senior Member

    Аватар для xaker1


    Регистрация
    30.06.2009
    Сообщений
    2,739

    Отправить сообщение для xaker1 с помощью ICQ

    По умолчанию

    Место есть? квота не исчерпана? иноды есть?

    Стоит один раз попробовать что бы влюбиться… в ISP.

    На все мои сообщения, действует конфигурация сервера: ISP Pro (всегда актуальная current версия), FreeBSD 8.0, php as fcgi, nginx+apache.

    Бесплатные плагины для ISPmanager.


  3. 22.07.2010, 23:23

    #3

    mutex вне форума


    Senior Member


    Регистрация
    18.07.2010
    Сообщений
    527

    По умолчанию

    самое страшное все есть и права стоят 777 ((

    только у одного пользователя, на котором домен висит, на который лицензия прописана. Остальные работают :-D


  4. 22.07.2010, 23:41

    #4

    xaker1 вне форума


    Senior Member

    Аватар для xaker1


    Регистрация
    30.06.2009
    Сообщений
    2,739

    Отправить сообщение для xaker1 с помощью ICQ

    По умолчанию

    А в логах что интерестного?

    Стоит один раз попробовать что бы влюбиться… в ISP.

    На все мои сообщения, действует конфигурация сервера: ISP Pro (всегда актуальная current версия), FreeBSD 8.0, php as fcgi, nginx+apache.

    Бесплатные плагины для ISPmanager.


  5. 22.07.2010, 23:41

    #5

    mutex вне форума


    Senior Member


    Регистрация
    18.07.2010
    Сообщений
    527

    По умолчанию

    в FileZilla FTP 533 ошибка постоянно. Какой Вам лог нужен?


  6. 22.07.2010, 23:43

    #6

    xaker1 вне форума


    Senior Member

    Аватар для xaker1


    Регистрация
    30.06.2009
    Сообщений
    2,739

    Отправить сообщение для xaker1 с помощью ICQ

    По умолчанию

    Лог ftp сервера. Где лежит — не могу угадать.

    Стоит один раз попробовать что бы влюбиться… в ISP.

    На все мои сообщения, действует конфигурация сервера: ISP Pro (всегда актуальная current версия), FreeBSD 8.0, php as fcgi, nginx+apache.

    Бесплатные плагины для ISPmanager.


  7. 23.07.2010, 12:29

    #7

    mutex вне форума


    Senior Member


    Регистрация
    18.07.2010
    Сообщений
    527

    По умолчанию

    Проблема решилась! Поменял владельца файлов с root на пользователя. Почему поменялся на root мне непонятно.


Fresh LAMP server setup with Ubuntu 12.04 and VSFTPD.

I’m trying to access the /var/www folder (web root) with FTP user.

I created a new user ftpuser and added it to the www-data user group created automatically by Apache.
Home directory of that user is set to /var/www.
I also changed the ownership of the /var/www to www-data group and changed permissions to 02775.

However, I’m still not able to upload files. Error is: «553 Could not create file».

  1. Can someone please explain me how to set these permissions properly?
  2. What is the correct setup? Should I set the home directory of ftpuser to /var/www or somehow diffeerently?

I found a lot of topics on the web but none of them offer a universal solution.

Thank you!


UPDATE:

Here is the output of ls -l of /var/www:

drwxr-sr-x 3 root ftpuser 4096

Content of vsftpd.conf file:

listen=YES
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=YES
connect_from_port_20=YES
chown_uploads=YES
chown_username=ftpuser
chroot_local_user=YES
secure_chroot_dir=/var/run/vsftpd/empty
pam_service_name=vsftpd
rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key

FTP error 553 is one of the typical errors that we come across while uploading files via FTP.

This is generally caused due to the incorrect permissions set to the files. Or else the FTP clients like vsftpd do not allow any upload.

At Bobcares, we often receive requests to fix FTP errors as a part of our Server Management Services.

Today, let’s discuss this 553 error in FTP and see how our Support Engineers fix it.

What does FTP error 553 indicate?

The error 553 indicates that requested action not taken or File name not allowed.

Generally, the error 533 shows up while uploading any files in the FTP. Again various FTP clients show different variants of the error message. For instance, FTP command prompt error appears as:

ftp> put /home/user/Desktop/FTP/2.jpg
local: /home/user/Desktop/FTP/2.jpg remote: /home/user/Desktop/FTP/2.jpg
227 Entering Passive Mode (192,xx,134,131,24,92).
553 Could not create file.
ftp>

Causes for FTP error 553

Let’s now check on the major causes for 553 errors in FTP.

1. Incorrect permissions

Quite often, FTP error 553 can occur due to bad permissions set to the files and folders.

If the uploading files do not have write permissions, then it will end up with errors.

It is very essential to have the write permissions set to the files so that we can make changes to the file by uploading any contents to it. Additionally, the user should have enough privileges to write the files to the destination directory too.

2. Errors in the configuration of vsftp

This error also occurs due to incorrect configuration of FTP clients like Vsftp. In other words, any incorrect information set in the configuration file results in such errors.

For example, the value of write_enable in the vsftpd.conf must be set to true to allow writing. However, by default, it is set to false. This creates problems and ends up in 553 errors.

We normally, make sure that the FTP client configuration is set properly with the proper details.

How we fix FTP error 553?

Having a decade of expertise in server management, our Support Engineers are familiar with these FTP errors.

Let’s now discuss different scenarios where we experienced this error and how we fix it.

1. Check the permissions and ownership to fix FTP error 553

One of our customers recently created a user and was successfully connected to FTP. But, while trying to upload some contents into the account, they got an error

229 Entering Extended Passive Mode (|||12011|).
553 Could not create file.

Our Support Engineers started troubleshooting the error by checking the permissions of the file. We could see that the permissions were set right.

So, then we tried to change the ownership of the folder to which customer was trying to upload the contents using the command:

chown USER:GROUP folder_name

Finally, after this change, the customer was able to upload the contents successfully.

2. Incorrect value in the configuration file.

Recently, one of our customers approached with an error message

553 Could not create file

Our Support Engineers started troubleshooting the error by checking the permissions of the files. We found that the permissions were all set right.

Later we went checking for the configuration file vsftpd.conf.

Here, we found the below line

guest_enable=YES

If this guest_enable is set to YES, then it will throw 553 Could not create file error.

So, we set the guest_enable value to NO.

This is because the FTP server will consider all the logins as a guest login. As a result, it will end up throwing error messages.

Finally, this fixed the error after changing the value of guest_enable from YES to NO.

[Still experiencing errors with FTP? – We’ll help you]

Conclusion

In short, the FTP error 553 occurs mainly due to the improper permissions set to the file and due to the incorrect details in the FTP client configuration. Today, we saw how our Support Engineers fix this error.


Я настроил VSFTPD на Amazon EC2 с Amazon Linux AMI. Я создал пользователя и теперь могу успешно подключиться через ftp. Однако, если я пытаюсь загрузить что-то, я получаю сообщение об ошибке «553 Не удалось создать файл».

Я предполагаю, что это связано с разрешениями, но я недостаточно знаю об этом, чтобы иметь возможность это исправить. В общем, что я должен сделать, чтобы иметь возможность загружать файлы?


Ответы:


Это может произойти по двум причинам: у вас нет прав на запись и выполнение для каталогов, ведущих к каталогу, в который вы пытаетесь загрузить файл, или vsftpdон настроен так, чтобы не разрешать загрузку.

В первом случае используйте chmodи chownпри необходимости убедитесь, что у вашего пользователя есть эти разрешения для каждого промежуточного каталога. Бит записи позволяет затронутому пользователю создавать, переименовывать или удалять файлы в каталоге и изменять атрибуты каталога, в то время как бит чтения позволяет затронутому пользователю перечислять файлы в каталоге. Поскольку промежуточные каталоги в пути также влияют на это, необходимо правильно установить разрешения, ведущие к конечному месту назначения, в которое вы собираетесь загружать.

В последнем случае посмотрите на свои vsftpd.conf. write_enableдолжно быть true, чтобы разрешить запись (и по умолчанию false). Существует хорошая документация по этому файлу конфигурации на man 5 vsftpd.conf.




Не могли бы вы попробовать это

chown -R ftpusername /var/www/html







Команда ftp put /path/to/local_fileне работает с vsftpd. Попробуйте следующее:

ftp put /path/to/local_file remote_file_name 

Вы можете выбрать любое имя, которое хотите remote_file_name, но вы должны указать его.





Домашний каталог FTP (ftp_home_dir), скорее всего, отключен в SeLinux. Чтобы увидеть состояние ваших ftpdуправляющих файлов, введите : getsebool -aи найдите раздел ftpd. Вы можете заметить, что ftp_home_dir выключен. Чтобы включить его, используйте следующую команду:setsebool -P ftp_home_dir=1

Проверьте введенные данные getsebool -a, затем повторите попытку загрузки.

Примечание: игнорировать знаки препинания


У меня была та же проблема, и я исправил изменение SELinux, чтобы разрешить запись в папку, которую я настроил для использования vsftp = /var/ftp/pub.

Эти ссылки могут быть полезны:

  • https://fedoraproject.org/wiki/SELinux/ftpd
  • http://prithak.blogspot.com/2013/07/installation-and-configuration-of.html

Если вы не хотите идти дальше с вашим SELinux, не меняйте его, поэтому вы увидите по умолчанию /etc/selinux/config

SELINUX=enforcing

затем просто запустите команды от имени пользователя root или с помощью sudo:

sudo setsebool -P ftpd_anon_write 1
sudo setsebool -P ftpd_full_access 1

как уже описано выше в другом комментарии.


Проверьте ваши vsftpd.confнастройки:

guest_enable=YES # set it to NO then restart the vsftpd service.

Если он установлен на YES, это также вызовет 553 Could not create file.

От: http://www.vsftpd.beasts.org/vsftpd_conf.html

guest_enable Если включено, все неанонимные логины классифицируются как «гостевые» логины. Гостевой логин переназначается на пользователя, указанного в настройке guest_username.

По умолчанию: НЕТ


Попробуй это

chmod 757 -R /var/www/html


Другая возможность: проверить дисковые квоты для пользователя / группы

доб:

repquota -a

XFS:

xfs_quota -x -c 'report' /mount_point


Следующий параметр даст ftpd доступ для записи куда угодно:

setsebool -P ftpd_full_acess=true 

Не используйте, ftpd_anon_writeесли вы не хотите, чтобы анонимные загрузки были разрешены.


Вероятно, в имени файла содержатся неподдерживаемые символы


Для Fedora23 выполните команды:

setsebool -P ftpd_anon_write 1 
setsebool -P ftpd_full_access 1

Это сработало для меня.

  • Печать

Страницы: [1]   Вниз

Тема: vsftpd 553 Could not create file.  (Прочитано 6827 раз)

0 Пользователей и 1 Гость просматривают эту тему.

Оффлайн
Усики

Команда: STOR musor.txt
Ответ: 553 Could not create file.
Ошибка: Критическая ошибка при передаче файлов

# Example config file /etc/vsftpd.conf
#
# The default compiled in settings are fairly paranoid. This sample file
# loosens things up a bit, to make the ftp daemon more usable.
# Please see vsftpd.conf.5 for all compiled in defaults.
#
# READ THIS: This example file is NOT an exhaustive list of vsftpd options.
# Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's
# capabilities.
#
#
# Run standalone?  vsftpd can run either from an inetd or as a standalone
# daemon started from an initscript.
listen=YES
#
# Run standalone with IPv6?
# Like the listen parameter, except vsftpd will listen on an IPv6 socket
# instead of an IPv4 one. This parameter and the listen parameter are mutually
# exclusive.
#listen_ipv6=YES
#
# Allow anonymous FTP? (Disabled by default)
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=0022
#
# 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
#
# If enabled, vsftpd will display directory listings with the time
# in  your  local  time  zone.  The default is to display GMT. The
# times returned by the MDTM FTP command are also affected by this
# option.
use_localtime=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
#
# If you want, you can arrange for uploaded anonymous files to be owned by
# a different user. Note! Using "root" for uploaded files is not
# recommended!
#chown_uploads=YES
#chown_username=whoever
#
# You may override where the log file goes if you like. The default is shown
# below.
#xferlog_file=/var/log/vsftpd.log
#
# If you want, you can have your log file in standard ftpd xferlog format.
# Note that the default log file location is /var/log/xferlog in this case.
#xferlog_std_format=YES
#
# You may change the default value for timing out an idle session.
#idle_session_timeout=600
#
# You may change the default value for timing out a data connection.
#data_connection_timeout=120
#
# It is recommended that you define on your system a unique user which the
# ftp server can use as a totally isolated and unprivileged user.
#nopriv_user=ftpsecure
#
# Enable this and the server will recognise asynchronous ABOR requests. Not
# recommended for security (the code is non-trivial). Not enabling it,
# however, may confuse older FTP clients.
#async_abor_enable=YES
#
# By default the server will pretend to allow ASCII mode but in fact ignore
# the request. Turn on the below options to have the server actually do ASCII
# mangling on files when in ASCII mode.
# Beware that on some FTP servers, ASCII support allows a denial of service
# attack (DoS) via the command "SIZE /big/file" in ASCII mode. vsftpd
# predicted this attack and has always been safe, reporting the size of the
# raw file.
# ASCII mangling is a horrible feature of the protocol.
#ascii_upload_enable=YES
#ascii_download_enable=YES
#
# You may fully customise the login banner string:
#ftpd_banner=Welcome to blah FTP service.
#
# You may specify a file of disallowed anonymous e-mail addresses. Apparently
# useful for combatting certain DoS attacks.
#deny_email_enable=YES
# (default follows)
#banned_email_file=/etc/vsftpd.banned_emails
#
# You may restrict local users to their home directories.  See the FAQ for
# the possible risks in this before using chroot_local_user or
# chroot_list_enable below.
chroot_local_user=YES
#
# You may specify an explicit list of local users to chroot() to their home
# directory. If chroot_local_user is YES, then this list becomes a list of
# users to NOT chroot().
# (Warning! chroot'ing can be very dangerous. If using chroot, make sure that
# the user does not have write access to the top level directory within the
# chroot)
#chroot_local_user=YES
#chroot_list_enable=YES
# (default follows)
#chroot_list_file=/etc/vsftpd.chroot_list
#
# You may activate the "-R" option to the builtin ls. This is disabled by
# default to avoid remote users being able to cause excessive I/O on large
# sites. However, some broken FTP clients such as "ncftp" and "mirror" assume
# the presence of the "-R" option, so there is a strong case for enabling it.
#ls_recurse_enable=YES
#
# Customization
#
# Some of vsftpd's settings don't fit the filesystem layout by
# default.
#
# This option should be the name of a directory which is empty.  Also, the
# directory should not be writable by the ftp user. This directory is used
# as a secure chroot() jail at times vsftpd does not require filesystem
# access.
secure_chroot_dir=/var/run/vsftpd/empty
#
# This string is the name of the PAM service vsftpd will use.
pam_service_name=vsftpd
#
# This option specifies the location of the RSA certificate to use for SSL
# encrypted connections.
rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
# This option specifies the location of the RSA key to use for SSL
# encrypted connections.
rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key

что я сделал не так?


Оффлайн
victor00000

Naykon,

Команда:   STOR musor.txt
Ответ:   553 Could not create file. невозможно для «musor.txt»: Отказано в доступе
Ошибка:   Критическая ошибка при передаче файлов


Оффлайн
Усики

извините но не понял намека)) как можно исправить?


Оффлайн
victor00000

Naykon,

cat /var/log/syslog | grep -i ftp


Оффлайн
Усики

root@ns391143:~# cat /var/log/syslog | grep -i ftp
Nov  1 16:08:58 ns391143 kernel: init: vsftpd main process (23404) killed by TERM signal
Nov  1 16:11:17 ns391143 kernel: init: vsftpd main process (23642) killed by TERM signal
Nov  1 16:14:55 ns391143 kernel: init: vsftpd main process (23860) killed by TERM signal
Nov  1 16:16:25 ns391143 kernel: init: vsftpd main process (24057) killed by TERM signal
Nov  1 16:36:17 ns391143 kernel: init: vsftpd main process (24187) killed by TERM signal
Nov  1 16:38:45 ns391143 kernel: init: vsftpd main process (25136) killed by TERM signal
Nov  1 19:20:55 ns391143 kernel: init: vsftpd main process (4000) killed by TERM signal
Nov  1 19:23:22 ns391143 kernel: init: vsftpd main process (8846) killed by TERM signal
Nov  1 19:25:14 ns391143 kernel: init: vsftpd main process (9068) killed by TERM signal
Nov  1 19:58:00 ns391143 kernel: init: vsftpd main process (9242) killed by TERM signal


Оффлайн
victor00000


Оффлайн
Усики


Оффлайн
victor00000


Оффлайн
Усики

VPS сервер. Ubuntu 14.04 x64 . хост купил


Оффлайн
victor00000

Naykon,
провайдер-(vps) виноват убить в программу(vsftpd).
можно тихо файл vsftpd переименовать пример ‘xopa’ выполнить.


Оффлайн
Усики

Нет. Уж точно. Понимал я это все и настраивал нормально, правда черт меня дернул перебить Ubuntu. Кароче найду проблему в нете отпишу что да как.


Пользователь решил продолжить мысль [time]02 Ноябрь 2014, 01:20:32[/time]:


Благодарю за вашу попытку решить мой вопрос ;)


Пользователь решил продолжить мысль 02 Ноября 2014, 20:47:23:


Бальше методов решения нет? ???

« Последнее редактирование: 02 Ноября 2014, 20:47:23 от Naykon »


Оффлайн
Sevva

Я бы проверил наличие симлинков где-то в расшареном через vsftd каталоге. Не помню точно код ошибки, но единственная проблема, которую я встретил примерно в таком контексте — файлы недоступны или нельзя закинуть, была именно в наличии симлинков. Он же ж very secure FTP сервер, ему симлинки в зарез. :)

« Последнее редактирование: 08 Января 2015, 16:47:38 от Sevva »


  • Печать

Страницы: [1]   Вверх


0

1

Здравствуйте.

Есть VPS сервер на хостинге с правами root.

Настраиваю ftp для одноразовой закачки файлов на сервер.

Пробую анонимный вход и стараюсь разрешить все действия для анонима.

vstfp.conf следующий:

listen_ipV6=YES
anonimous_enable=YES
local_enable=YES
write_enable=YES
anon_upload_enable=YES
use_localtime=YES
pasv_enable=NO
chroot_local_user=YES
allow_writeable_chroot=YES
local_root=/home/ftp
anon_root=/home/ftp
no_anon_password=YES
#secure_chroot_dir=/var/run/vsftpd/empty закомментирован

Подключаюсь к этому добру через FileZilla, соединение успешно, каталог извлечён. Но директория корневая и пустая и нет возможности перейти в любую другую папку, создать новую и т.д.
Также при попытке копирования файла в окне сообщений FileZilla следующие меседжи:

  • Ответ: 200 PORT command successful. Consider using PASV.
  • Команда: STOR index.html
  • Ответ: 553 Could not create file.
  • Ошибка: Критическая ошибка при передаче файлов

Подскажите, как лечить.

P.S. Простите за кривые руки.

Здравствуйте, уважаемые знатоки! Нужна ваша помощь.

Я арендую VPS (OVZ, centos 5.4, 1024Mb, 2.3GHz, Apache, nginx), на котором стоит vsftp.

Обычным образом залогиниваюсь через консоль:

затем пытаюсь отправить файл:

и получаю ошибку:

xferlog (log ftp):

Код: Выделить всё

Fri Nov 12 23:03:32 2010 1 79.165.100.101 0 /home/myname/test.txt b _ i r username ftp 0 * i

Права на папку 777,
Firewall выключен,
Selinux выключен.
Пробовал эту операцию с разных компьютеров, с разными ОС и даже из разных стран (есть сервер в Германии, откуда пытался сделать это по SSH), результат один.

vsftpd.conf:

Код: Выделить всё

anonymous_enable=YES
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_std_format=YES
listen=YES
pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES
chroot_local_user=YES
force_dot_files=YES
background=YES
anonymous_enable=NO

Первая и последняя команды — это, видимо, результат работы ISPmanager.

Если послать файл командой put test.txt (без полного пути к исходному файлу), то все в порядке.
И наплевать бы на консольный ftp, но мне нужно работать с файлами на сервере через kate или подобный редактор, но при сохранении редактор пишет об ошибке записи.

Сразу замечу, что на остальных моих хостингах этой проблемы нет. Файлы копируются как надо, kate, netbeans и т.д. работают нормально.

Хостер не сознается, говорит, что все в порядке и ftp работает. Менять хостера не хочется, так как все остальное более чем устраивает и просто надо устранить эту досадную проблему своими руками. А как, увы, не знаю.

Очень жду вашей помощи и всем спасибо за конструктивные замечания.

I’m having issue with my vsftpd.

here is my info:

# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 7.0 (Maipo)
# uname -a
Linux ip-10-150-53-42.ec2.internal 3.10.0-123.el7.x86_64 #1 SMP Mon May 5 11:16:57 EDT 2014 x86_64 x86_64 x86_64 GNU/Linux
# rpm -q vsftpd
vsftpd-3.0.2-9.el7.x86_64
# ll -d /usr/share/doc/vsftpd-3.0.2/EXAMPLE/VIRTUAL_USERS
drwxr-xr-x. 2 root root 98 Jun 13 20:33 /usr/share/doc/vsftpd-3.0.2/EXAMPLE/VIRTUAL_USERS
# grep -v ^# /etc/vsftpd/vsftpd.conf
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_std_format=YES
chroot_local_user=YES
listen=NO
listen_ipv6=YES

pam_service_name=vsftpd.pam
userlist_enable=YES
tcp_wrappers=YES

guest_enable=YES
local_root=/var/www/html/$USER
user_sub_token=$USER
hide_ids=YES
nopriv_user=apache
virtual_use_local_privs=YES
log_ftp_protocol=YES
xferlog_std_format=YES
syslog_enable=YES
# getsebool ftp_home_dir
ftp_home_dir --> on
# 

I’m trying to utilize virtual users feature inside of vsftpd and while authentication part works without any issues, unfortunately write doesn’t work.

# ls -ld /var/www/html/
drwxr-xr-x. 5 root root 71 Jun 14 13:45 /var/www/html/
# ls -ld /var/www/html/test/
drwxrwxr-x. 2 apache apache 30 Jun 14 14:45 /var/www/html/test/
# cd /etc/
# ftp 0
Connected to 0 (0.0.0.0).
220 (vsFTPd 3.0.2)
Name (0:root): test
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> put fstab
local: fstab remote: fstab
227 Entering Passive Mode (127,0,0,1,202,176).
553 Could not create file.
ftp> 221 Goodbye.
# 

I’ve tried to disabling(permissive) and enabling(enforcing) SELinux and still same undesirable result(

What am I missing?

Castaglia's user avatar

Castaglia

3,3493 gold badges21 silver badges42 bronze badges

asked Jun 14, 2014 at 19:43

alexus's user avatar

I’m not sure why (perhaps a bug?), even though nopriv_user was set to apache, somehow vsftpd was thinking it set to ftp:

# grep ^nopriv_user vsftpd.conf
nopriv_user=apache
#

… yet when I upload file it’s like nopriv_user is set to ftp:

# ls -ld test test/13924501638_26bbdf9023_o.jpg
drwxrwxr-x. 2 apache ftp      41 Jun 17 13:01 test
-rw-r--r--. 1 ftp    ftp 2885458 Jun 17 13:01 test/13924501638_26bbdf9023_o.jpg
# 

So, unless I’m doing something wrong, maybe I should submit it to vsftpd as bug.

answered Jun 17, 2014 at 17:03

alexus's user avatar

alexusalexus

13k32 gold badges116 silver badges174 bronze badges

Maybe because dir. owner is root and you’re trying to write as test user

answered Jun 14, 2014 at 23:32

mangia's user avatar

mangiamangia

5892 silver badges6 bronze badges

1

Понравилась статья? Поделить с друзьями:
  • 5523 ошибка skoda
  • 552 ошибка на сайте
  • 552 ошибка smtp
  • 551 ошибка почты
  • 550602 ошибка hp