10 Replies Latest reply: Mar 25, 2013 4:01 AM by rukbat RSS

    Change owner of files in FTP configuration

    975148
      We have RHEL 5.9 servers, I wanted to know what is the configuration in vsftpd.conf required so that the owner of the file uploaded to the FTP server changes to the user uploading the files. The current relevant configuration of vsftpd.conf is like:-

      anon_uploads=yes
      chown_uploads=yes
      chown_username=daemon
      anon_umask=077

      I hope, my question is clear of what is the configuration in vsftpd.conf required so that the owner of the file uploaded is same as the user uploading it.

      Please revert with the reply to my query.

      Regards
        • 1. Re: Change owner of files in FTP configuration
          Catch_22
          As far as I understand you cannot do that with anonymous FTP. Which username should the anonymous login use?

          Why bother with legacy ftp services at all? Can't you use SSH and transfer files using SCP or SFTP?
          • 2. Re: Change owner of files in FTP configuration
            975148
            Thanks for your answer. The users can use the login created in Linux for them and the ownership of the files need to be changed which is done by the statement,

            chown_username=daemon

            at present. So, the above statement may need to be changed to give ownership of uploading user.

            I want to create an FTP server for users who are non-IT people, so the basic functions of an FTP server should be available. Using things like SSH and SFTP would mean that I have not been able to create an FTP server on my own.

            Regards
            • 3. Re: Change owner of files in FTP configuration
              Catch_22
              I want to create an FTP server for users who are non-IT people, so the basic functions of an FTP server should be available. Using things like SSH and SFTP would mean that I have not been able to create an FTP server on my own.
              Sorry to hear that because business reasons for setting up a system are usually requirements other than personal challenge. It's been many years since I have setup an ftp server, and I think the same applies to most IT Pros. You may have to find a vsftp forum for any specific or sophisticated vsftp setup. I suggest to read the documentation and search the web. Perhaps you can create some instructions and make it available online and perhaps somebody else will find it useful.

              For what it's worth, chown_username is the name of the user who is given ownership of anonymously uploaded files.
              • 4. Re: Change owner of files in FTP configuration
                EdStevens
                Dude wrote:
                I want to create an FTP server for users who are non-IT people, so the basic functions of an FTP server should be available. Using things like SSH and SFTP would mean that I have not been able to create an FTP server on my own.
                Sorry to hear that because business reasons for setting up a system are usually requirements other than personal challenge. It's been many years since I have setup an ftp server, and I think the same applies to most IT Pros. You may have to find a vsftp forum for any specific or sophisticated vsftp setup. I suggest to read the documentation and search the web. Perhaps you can create some instructions and make it available online and perhaps somebody else will find it useful.
                FWIW, it can't be that hard. I did it just a couple of weeks ago, and I'm neither an SA nor a network guy. Took me maybe an hour, max. Granted, I may/probably overlooked some security best practices. It was for a vm running under vbox on my desktop, with a hostonly NIC, so I really wasn't worried about those issues, just needed to get ftp working between two vm's.

                To the OP: Google truly is our friend -- but only if we use it.

                For what it's worth, chown_username is the name of the user who is given ownership of anonymously uploaded files.
                • 5. Re: Change owner of files in FTP configuration
                  975148
                  It would be greatly appreciated if you could give a few details with regard to the OS on which you built the FTP server along with the steps that you used. This would greatly help me as I am looking to host things on the server and the users can access it without having to use any external components like an FTP client etc.

                  Regards
                  • 6. Re: Change owner of files in FTP configuration
                    975148
                    As I replied to Dude, it would be greatly appreciated if you could list out the OS used and the detailed steps used for setup. As you have succeeded in setting up the FTP server recently, it should not be a problem for you to list them out as that would greatly help me.

                    Regards
                    • 7. Re: Change owner of files in FTP configuration
                      Catch_22
                      Its been many years ago since I looked into setting up some anonymous FTP access. Sorry I have no records, but there is plenty in Google. If you want to install a FTP sever and care about security you need to stick to FTP with anonymous access only. Passwords in FTP are transferred in clear text, which is generally considered a non acceptable security risk. If you have a network firewall, you also need to take passive vs. active FTP access into account.

                      FTP is a server-client based file transfer protocol and therefore requires a FTP client. Like we discussed in a different thread, Web browsers typically provide FTP access for download, but the ability to upload or do file management depends on your type and version of the Web browser. Or integration with the OS in case of MS Internet Explorer. If you want to test FTP server functionality you need to use a real FTP client and cannot rely on your Web browser for troubleshooting FTP problems.

                      I understand your concern about providing a file server without the need to install any additional client software, in which case FTP is not the best solution unless you want to provide download access only. That's were Samba comes into play and you should probably be looking into setting up a Samba server. Samba provides CIFS, which is the Windows standard protocol for file and printer access. All previous and recent non MS-Windows systems like Mac OS X and Linux have Samba clients installed by default and therefore do not require additional software installation.
                      • 8. Re: Change owner of files in FTP configuration
                        EdStevens
                        972145 wrote:
                        As I replied to Dude, it would be greatly appreciated if you could list out the OS used and the detailed steps used for setup. As you have succeeded in setting up the FTP server recently, it should not be a problem for you to list them out as that would greatly help me.

                        Regards
                        I didn't make any notes. As I said, I just used google to find what I needed. You might start with "create ftp server". It will be a good learning experience for you.
                        • 9. Re: Change owner of files in FTP configuration
                          975148
                          Thanks but there is a observation that using Windows explorer can help us to do an upload of a file in a very convenient way. Using Windows explorer is a much better way of accessing an FTP server rather than a browser as the uploading can be done easily.
                          • 10. Re: Change owner of files in FTP configuration
                            rukbat
                            972145 wrote:
                            Thanks but there is a observation that using Windows explorer
                            ... then you would need to go ask about that in a Microsoft forum.