tftp error code 2 access violation (tftp not working)












3















System info:



Linux ravi-Inspiron-N5010 3.13.0-46-generic #79-Ubuntu SMP Tue Mar 10
20:08:14 UTC 2015 i686 i686 i686 GNU/Linux


Using Ubuntu 14.04.2 LTS.



I am struggling to run tftp localhost.



Tried:



root@ravi-Inspiron-N5010:/home/ravi/Desktop# service tftpd-hpa restart
tftpd-hpa stop/waiting
tftpd-hpa start/running
root@ravi-Inspiron-N5010:/home/ravi/Desktop# service tftpd-hpa status
tftpd-hpa start/running


Now I get error:



root@ravi-Inspiron-N5010:/home/ravi/Desktop# tftp 127.0.0.1
tftp> put test
Error code 2: Access violation
tftp>


permission of the file I am trying to put is :



root@ravi-Inspiron-N5010:/home/ravi/Desktop# ls -ld test 
-rwxrwxrwx 1 ravi ravi 0 Mar 21 20:09 test


Permission of the /tftpboot folder:



root@ravi-Inspiron-N5010:/# ls -ld  tftpboot/
drwxrwxrwx 2 nobody root 4096 Mar 15 15:34 tftpboot/


Additional Information



root@ravi-Inspiron-N5010:/home/ravi/Desktop# nano /etc/xinetd.d/tftp

service tftp


{
protocol = udp
port = 69
socket_type = dgram
wait = yes
user = nobody
server = /usr/sbin/in.tftpd
server_args = /tftpboot -s
disable = no
}


Please help me resolve this issue.










share|improve this question





























    3















    System info:



    Linux ravi-Inspiron-N5010 3.13.0-46-generic #79-Ubuntu SMP Tue Mar 10
    20:08:14 UTC 2015 i686 i686 i686 GNU/Linux


    Using Ubuntu 14.04.2 LTS.



    I am struggling to run tftp localhost.



    Tried:



    root@ravi-Inspiron-N5010:/home/ravi/Desktop# service tftpd-hpa restart
    tftpd-hpa stop/waiting
    tftpd-hpa start/running
    root@ravi-Inspiron-N5010:/home/ravi/Desktop# service tftpd-hpa status
    tftpd-hpa start/running


    Now I get error:



    root@ravi-Inspiron-N5010:/home/ravi/Desktop# tftp 127.0.0.1
    tftp> put test
    Error code 2: Access violation
    tftp>


    permission of the file I am trying to put is :



    root@ravi-Inspiron-N5010:/home/ravi/Desktop# ls -ld test 
    -rwxrwxrwx 1 ravi ravi 0 Mar 21 20:09 test


    Permission of the /tftpboot folder:



    root@ravi-Inspiron-N5010:/# ls -ld  tftpboot/
    drwxrwxrwx 2 nobody root 4096 Mar 15 15:34 tftpboot/


    Additional Information



    root@ravi-Inspiron-N5010:/home/ravi/Desktop# nano /etc/xinetd.d/tftp

    service tftp


    {
    protocol = udp
    port = 69
    socket_type = dgram
    wait = yes
    user = nobody
    server = /usr/sbin/in.tftpd
    server_args = /tftpboot -s
    disable = no
    }


    Please help me resolve this issue.










    share|improve this question



























      3












      3








      3








      System info:



      Linux ravi-Inspiron-N5010 3.13.0-46-generic #79-Ubuntu SMP Tue Mar 10
      20:08:14 UTC 2015 i686 i686 i686 GNU/Linux


      Using Ubuntu 14.04.2 LTS.



      I am struggling to run tftp localhost.



      Tried:



      root@ravi-Inspiron-N5010:/home/ravi/Desktop# service tftpd-hpa restart
      tftpd-hpa stop/waiting
      tftpd-hpa start/running
      root@ravi-Inspiron-N5010:/home/ravi/Desktop# service tftpd-hpa status
      tftpd-hpa start/running


      Now I get error:



      root@ravi-Inspiron-N5010:/home/ravi/Desktop# tftp 127.0.0.1
      tftp> put test
      Error code 2: Access violation
      tftp>


      permission of the file I am trying to put is :



      root@ravi-Inspiron-N5010:/home/ravi/Desktop# ls -ld test 
      -rwxrwxrwx 1 ravi ravi 0 Mar 21 20:09 test


      Permission of the /tftpboot folder:



      root@ravi-Inspiron-N5010:/# ls -ld  tftpboot/
      drwxrwxrwx 2 nobody root 4096 Mar 15 15:34 tftpboot/


      Additional Information



      root@ravi-Inspiron-N5010:/home/ravi/Desktop# nano /etc/xinetd.d/tftp

      service tftp


      {
      protocol = udp
      port = 69
      socket_type = dgram
      wait = yes
      user = nobody
      server = /usr/sbin/in.tftpd
      server_args = /tftpboot -s
      disable = no
      }


      Please help me resolve this issue.










      share|improve this question
















      System info:



      Linux ravi-Inspiron-N5010 3.13.0-46-generic #79-Ubuntu SMP Tue Mar 10
      20:08:14 UTC 2015 i686 i686 i686 GNU/Linux


      Using Ubuntu 14.04.2 LTS.



      I am struggling to run tftp localhost.



      Tried:



      root@ravi-Inspiron-N5010:/home/ravi/Desktop# service tftpd-hpa restart
      tftpd-hpa stop/waiting
      tftpd-hpa start/running
      root@ravi-Inspiron-N5010:/home/ravi/Desktop# service tftpd-hpa status
      tftpd-hpa start/running


      Now I get error:



      root@ravi-Inspiron-N5010:/home/ravi/Desktop# tftp 127.0.0.1
      tftp> put test
      Error code 2: Access violation
      tftp>


      permission of the file I am trying to put is :



      root@ravi-Inspiron-N5010:/home/ravi/Desktop# ls -ld test 
      -rwxrwxrwx 1 ravi ravi 0 Mar 21 20:09 test


      Permission of the /tftpboot folder:



      root@ravi-Inspiron-N5010:/# ls -ld  tftpboot/
      drwxrwxrwx 2 nobody root 4096 Mar 15 15:34 tftpboot/


      Additional Information



      root@ravi-Inspiron-N5010:/home/ravi/Desktop# nano /etc/xinetd.d/tftp

      service tftp


      {
      protocol = udp
      port = 69
      socket_type = dgram
      wait = yes
      user = nobody
      server = /usr/sbin/in.tftpd
      server_args = /tftpboot -s
      disable = no
      }


      Please help me resolve this issue.







      server permissions tftp






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Aug 10 '17 at 11:12









      Zanna

      50.9k13137241




      50.9k13137241










      asked Mar 21 '15 at 15:15









      Ravi SharmaRavi Sharma

      21115




      21115






















          7 Answers
          7






          active

          oldest

          votes


















          4














          Check syslog and you will see that :



           tftpd: serving file from /srv/tftp


          Basically there is a bug and you will need in your case to move all files from the folder /tftpboot to /srv/tftp (make the folder /srv/tftp if doens't exist) and make sure you give 777 permissions and to all file inside, restart xinetd and it will works!






          share|improve this answer


























          • Your answer helped me solve this problem. But I solved it by modifying /etc/inetd.conf

            – BЈовић
            Jul 21 '16 at 8:55



















          4














          The file you want to put via tftp must exist in the destination directory, and have permissions allowing it to be overwritten. For your instance, test must exist in /tftpboot.



          You can see the reason in the tftp man page BUGS section.



          I'm struggling to solve how to put a new file via tftp, but still don't know how.






          share|improve this answer


























          • Use "-c" argument to support create new file, if you are using tftpd-hpa

            – alfred
            Dec 19 '17 at 13:55



















          2














          This could be because 14.04 has a tftp server setting in /etc/inetd.conf:



          #BOOT: TFTP service is provided primarily for booting.  Most sites
          # run this only on machines acting as "boot servers."
          tftp dgram udp wait nobody /usr/sbin/tcpd /usr/sbin/in.tftpd /srv/tftp


          you can comment out this line and try again.



          I got this from here:
          http://www.beer.org/blog/tftpd-and-xinetd-on-ubuntu.html






          share|improve this answer

































            1














            As leondgarse mention, you cannot upload new files directly with your settings. But you can add "-c" to server_args, like:



            service tftp
            {
            protocol = udp
            port = 69
            socket_type = dgram
            wait = yes
            user = nobody
            server = /usr/sbin/in.tftpd
            server_args = -c -s /tftpboot
            disable = no
            }


            For detail, you can see man page of "in.tftpd":



               --create, -c
            Allow new files to be created. By default, tftpd will only allow upload of files that already exist. Files are created with default permissions allow‐
            ing anyone to read or write them, unless the --permissive or --umask options are specified.





            share|improve this answer
























            • Using xinetd I get the "unknown option -?" message in syslog. Is this solution for tftp-hba only?

              – Noel
              Mar 17 '18 at 13:09











            • @Noel, yes, not all tftpd implementation supports '-c‘

              – alfred
              Mar 22 '18 at 15:01





















            0














            Not sure if this is something with the design of TFTP but when doing a put it does not let you create a file.



            Solution:



            Create the file before hand and give 777 rights. Run transfer again and it should work.






            share|improve this answer































              0














              Please check the files mode bits.



              In my case, the tftp root directory is /opt/tftpboot/



              Using ls -l command, I could see the file mode was 600, so when I try to access tftp to get this file with anonymous, it reports an access violation.



              This may be the cause of this error. But there may be another reason for it.






              share|improve this answer

































                0














                Troubleshooting TFTPD Server on Ubuntu 14.0.4 by Dayanand Ambawade



                Step-1: Edit /etc/inetd.conf



                tftp dgram udp wait nobody /usr/sbin/tcpd /usr/sbin/in.tftpd /srv/tftpboot



                Step-2: Write script for tftpd



                sudo nano /etc/xinetd.d/tftp



                service tftp



                {
                protocol = udp
                port = 69
                socket_type = dgram
                wait = yes
                user = nobody
                server = /usr/sbin/in.tftpd
                server_args = /srv/tftpboot -s
                disable = no
                }


                Step-3: Create Directory and set the permissions



                sudo mkdir /srv/tftpboot
                sudo echo "Test TFTP Server" > /srv/tftpboot/test.txt
                sudo chmod 777 -R /srv/tftpboot
                sudo chown -R nobody.root /srv/tftpboot


                Step-4: Start service



                sudo service xinetd restart
                sudo service inetutils-inetd restart


                Step-5: Test Server



                echo "get test.txt" | tftp 127.0.0.1
                cat test.txt
                Test TFTP Server


                Hopefully this will solve the problem.
                Regards






                share|improve this answer

























                  Your Answer








                  StackExchange.ready(function() {
                  var channelOptions = {
                  tags: "".split(" "),
                  id: "89"
                  };
                  initTagRenderer("".split(" "), "".split(" "), channelOptions);

                  StackExchange.using("externalEditor", function() {
                  // Have to fire editor after snippets, if snippets enabled
                  if (StackExchange.settings.snippets.snippetsEnabled) {
                  StackExchange.using("snippets", function() {
                  createEditor();
                  });
                  }
                  else {
                  createEditor();
                  }
                  });

                  function createEditor() {
                  StackExchange.prepareEditor({
                  heartbeatType: 'answer',
                  autoActivateHeartbeat: false,
                  convertImagesToLinks: true,
                  noModals: true,
                  showLowRepImageUploadWarning: true,
                  reputationToPostImages: 10,
                  bindNavPrevention: true,
                  postfix: "",
                  imageUploader: {
                  brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
                  contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
                  allowUrls: true
                  },
                  onDemand: true,
                  discardSelector: ".discard-answer"
                  ,immediatelyShowMarkdownHelp:true
                  });


                  }
                  });














                  draft saved

                  draft discarded


















                  StackExchange.ready(
                  function () {
                  StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f599558%2ftftp-error-code-2-access-violation-tftp-not-working%23new-answer', 'question_page');
                  }
                  );

                  Post as a guest















                  Required, but never shown

























                  7 Answers
                  7






                  active

                  oldest

                  votes








                  7 Answers
                  7






                  active

                  oldest

                  votes









                  active

                  oldest

                  votes






                  active

                  oldest

                  votes









                  4














                  Check syslog and you will see that :



                   tftpd: serving file from /srv/tftp


                  Basically there is a bug and you will need in your case to move all files from the folder /tftpboot to /srv/tftp (make the folder /srv/tftp if doens't exist) and make sure you give 777 permissions and to all file inside, restart xinetd and it will works!






                  share|improve this answer


























                  • Your answer helped me solve this problem. But I solved it by modifying /etc/inetd.conf

                    – BЈовић
                    Jul 21 '16 at 8:55
















                  4














                  Check syslog and you will see that :



                   tftpd: serving file from /srv/tftp


                  Basically there is a bug and you will need in your case to move all files from the folder /tftpboot to /srv/tftp (make the folder /srv/tftp if doens't exist) and make sure you give 777 permissions and to all file inside, restart xinetd and it will works!






                  share|improve this answer


























                  • Your answer helped me solve this problem. But I solved it by modifying /etc/inetd.conf

                    – BЈовић
                    Jul 21 '16 at 8:55














                  4












                  4








                  4







                  Check syslog and you will see that :



                   tftpd: serving file from /srv/tftp


                  Basically there is a bug and you will need in your case to move all files from the folder /tftpboot to /srv/tftp (make the folder /srv/tftp if doens't exist) and make sure you give 777 permissions and to all file inside, restart xinetd and it will works!






                  share|improve this answer















                  Check syslog and you will see that :



                   tftpd: serving file from /srv/tftp


                  Basically there is a bug and you will need in your case to move all files from the folder /tftpboot to /srv/tftp (make the folder /srv/tftp if doens't exist) and make sure you give 777 permissions and to all file inside, restart xinetd and it will works!







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Aug 10 '17 at 11:14









                  Zanna

                  50.9k13137241




                  50.9k13137241










                  answered Apr 20 '16 at 13:20









                  enjoyenjoy

                  4651410




                  4651410













                  • Your answer helped me solve this problem. But I solved it by modifying /etc/inetd.conf

                    – BЈовић
                    Jul 21 '16 at 8:55



















                  • Your answer helped me solve this problem. But I solved it by modifying /etc/inetd.conf

                    – BЈовић
                    Jul 21 '16 at 8:55

















                  Your answer helped me solve this problem. But I solved it by modifying /etc/inetd.conf

                  – BЈовић
                  Jul 21 '16 at 8:55





                  Your answer helped me solve this problem. But I solved it by modifying /etc/inetd.conf

                  – BЈовић
                  Jul 21 '16 at 8:55













                  4














                  The file you want to put via tftp must exist in the destination directory, and have permissions allowing it to be overwritten. For your instance, test must exist in /tftpboot.



                  You can see the reason in the tftp man page BUGS section.



                  I'm struggling to solve how to put a new file via tftp, but still don't know how.






                  share|improve this answer


























                  • Use "-c" argument to support create new file, if you are using tftpd-hpa

                    – alfred
                    Dec 19 '17 at 13:55
















                  4














                  The file you want to put via tftp must exist in the destination directory, and have permissions allowing it to be overwritten. For your instance, test must exist in /tftpboot.



                  You can see the reason in the tftp man page BUGS section.



                  I'm struggling to solve how to put a new file via tftp, but still don't know how.






                  share|improve this answer


























                  • Use "-c" argument to support create new file, if you are using tftpd-hpa

                    – alfred
                    Dec 19 '17 at 13:55














                  4












                  4








                  4







                  The file you want to put via tftp must exist in the destination directory, and have permissions allowing it to be overwritten. For your instance, test must exist in /tftpboot.



                  You can see the reason in the tftp man page BUGS section.



                  I'm struggling to solve how to put a new file via tftp, but still don't know how.






                  share|improve this answer















                  The file you want to put via tftp must exist in the destination directory, and have permissions allowing it to be overwritten. For your instance, test must exist in /tftpboot.



                  You can see the reason in the tftp man page BUGS section.



                  I'm struggling to solve how to put a new file via tftp, but still don't know how.







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Aug 17 '17 at 17:18









                  Zanna

                  50.9k13137241




                  50.9k13137241










                  answered Jun 3 '15 at 10:30









                  leondgarseleondgarse

                  412




                  412













                  • Use "-c" argument to support create new file, if you are using tftpd-hpa

                    – alfred
                    Dec 19 '17 at 13:55



















                  • Use "-c" argument to support create new file, if you are using tftpd-hpa

                    – alfred
                    Dec 19 '17 at 13:55

















                  Use "-c" argument to support create new file, if you are using tftpd-hpa

                  – alfred
                  Dec 19 '17 at 13:55





                  Use "-c" argument to support create new file, if you are using tftpd-hpa

                  – alfred
                  Dec 19 '17 at 13:55











                  2














                  This could be because 14.04 has a tftp server setting in /etc/inetd.conf:



                  #BOOT: TFTP service is provided primarily for booting.  Most sites
                  # run this only on machines acting as "boot servers."
                  tftp dgram udp wait nobody /usr/sbin/tcpd /usr/sbin/in.tftpd /srv/tftp


                  you can comment out this line and try again.



                  I got this from here:
                  http://www.beer.org/blog/tftpd-and-xinetd-on-ubuntu.html






                  share|improve this answer






























                    2














                    This could be because 14.04 has a tftp server setting in /etc/inetd.conf:



                    #BOOT: TFTP service is provided primarily for booting.  Most sites
                    # run this only on machines acting as "boot servers."
                    tftp dgram udp wait nobody /usr/sbin/tcpd /usr/sbin/in.tftpd /srv/tftp


                    you can comment out this line and try again.



                    I got this from here:
                    http://www.beer.org/blog/tftpd-and-xinetd-on-ubuntu.html






                    share|improve this answer




























                      2












                      2








                      2







                      This could be because 14.04 has a tftp server setting in /etc/inetd.conf:



                      #BOOT: TFTP service is provided primarily for booting.  Most sites
                      # run this only on machines acting as "boot servers."
                      tftp dgram udp wait nobody /usr/sbin/tcpd /usr/sbin/in.tftpd /srv/tftp


                      you can comment out this line and try again.



                      I got this from here:
                      http://www.beer.org/blog/tftpd-and-xinetd-on-ubuntu.html






                      share|improve this answer















                      This could be because 14.04 has a tftp server setting in /etc/inetd.conf:



                      #BOOT: TFTP service is provided primarily for booting.  Most sites
                      # run this only on machines acting as "boot servers."
                      tftp dgram udp wait nobody /usr/sbin/tcpd /usr/sbin/in.tftpd /srv/tftp


                      you can comment out this line and try again.



                      I got this from here:
                      http://www.beer.org/blog/tftpd-and-xinetd-on-ubuntu.html







                      share|improve this answer














                      share|improve this answer



                      share|improve this answer








                      edited Dec 12 '15 at 23:54









                      Jakuje

                      5,31471831




                      5,31471831










                      answered Dec 10 '15 at 0:21









                      hashtpaahashtpaa

                      1233




                      1233























                          1














                          As leondgarse mention, you cannot upload new files directly with your settings. But you can add "-c" to server_args, like:



                          service tftp
                          {
                          protocol = udp
                          port = 69
                          socket_type = dgram
                          wait = yes
                          user = nobody
                          server = /usr/sbin/in.tftpd
                          server_args = -c -s /tftpboot
                          disable = no
                          }


                          For detail, you can see man page of "in.tftpd":



                             --create, -c
                          Allow new files to be created. By default, tftpd will only allow upload of files that already exist. Files are created with default permissions allow‐
                          ing anyone to read or write them, unless the --permissive or --umask options are specified.





                          share|improve this answer
























                          • Using xinetd I get the "unknown option -?" message in syslog. Is this solution for tftp-hba only?

                            – Noel
                            Mar 17 '18 at 13:09











                          • @Noel, yes, not all tftpd implementation supports '-c‘

                            – alfred
                            Mar 22 '18 at 15:01


















                          1














                          As leondgarse mention, you cannot upload new files directly with your settings. But you can add "-c" to server_args, like:



                          service tftp
                          {
                          protocol = udp
                          port = 69
                          socket_type = dgram
                          wait = yes
                          user = nobody
                          server = /usr/sbin/in.tftpd
                          server_args = -c -s /tftpboot
                          disable = no
                          }


                          For detail, you can see man page of "in.tftpd":



                             --create, -c
                          Allow new files to be created. By default, tftpd will only allow upload of files that already exist. Files are created with default permissions allow‐
                          ing anyone to read or write them, unless the --permissive or --umask options are specified.





                          share|improve this answer
























                          • Using xinetd I get the "unknown option -?" message in syslog. Is this solution for tftp-hba only?

                            – Noel
                            Mar 17 '18 at 13:09











                          • @Noel, yes, not all tftpd implementation supports '-c‘

                            – alfred
                            Mar 22 '18 at 15:01
















                          1












                          1








                          1







                          As leondgarse mention, you cannot upload new files directly with your settings. But you can add "-c" to server_args, like:



                          service tftp
                          {
                          protocol = udp
                          port = 69
                          socket_type = dgram
                          wait = yes
                          user = nobody
                          server = /usr/sbin/in.tftpd
                          server_args = -c -s /tftpboot
                          disable = no
                          }


                          For detail, you can see man page of "in.tftpd":



                             --create, -c
                          Allow new files to be created. By default, tftpd will only allow upload of files that already exist. Files are created with default permissions allow‐
                          ing anyone to read or write them, unless the --permissive or --umask options are specified.





                          share|improve this answer













                          As leondgarse mention, you cannot upload new files directly with your settings. But you can add "-c" to server_args, like:



                          service tftp
                          {
                          protocol = udp
                          port = 69
                          socket_type = dgram
                          wait = yes
                          user = nobody
                          server = /usr/sbin/in.tftpd
                          server_args = -c -s /tftpboot
                          disable = no
                          }


                          For detail, you can see man page of "in.tftpd":



                             --create, -c
                          Allow new files to be created. By default, tftpd will only allow upload of files that already exist. Files are created with default permissions allow‐
                          ing anyone to read or write them, unless the --permissive or --umask options are specified.






                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Dec 19 '17 at 14:04









                          alfredalfred

                          476138




                          476138













                          • Using xinetd I get the "unknown option -?" message in syslog. Is this solution for tftp-hba only?

                            – Noel
                            Mar 17 '18 at 13:09











                          • @Noel, yes, not all tftpd implementation supports '-c‘

                            – alfred
                            Mar 22 '18 at 15:01





















                          • Using xinetd I get the "unknown option -?" message in syslog. Is this solution for tftp-hba only?

                            – Noel
                            Mar 17 '18 at 13:09











                          • @Noel, yes, not all tftpd implementation supports '-c‘

                            – alfred
                            Mar 22 '18 at 15:01



















                          Using xinetd I get the "unknown option -?" message in syslog. Is this solution for tftp-hba only?

                          – Noel
                          Mar 17 '18 at 13:09





                          Using xinetd I get the "unknown option -?" message in syslog. Is this solution for tftp-hba only?

                          – Noel
                          Mar 17 '18 at 13:09













                          @Noel, yes, not all tftpd implementation supports '-c‘

                          – alfred
                          Mar 22 '18 at 15:01







                          @Noel, yes, not all tftpd implementation supports '-c‘

                          – alfred
                          Mar 22 '18 at 15:01













                          0














                          Not sure if this is something with the design of TFTP but when doing a put it does not let you create a file.



                          Solution:



                          Create the file before hand and give 777 rights. Run transfer again and it should work.






                          share|improve this answer




























                            0














                            Not sure if this is something with the design of TFTP but when doing a put it does not let you create a file.



                            Solution:



                            Create the file before hand and give 777 rights. Run transfer again and it should work.






                            share|improve this answer


























                              0












                              0








                              0







                              Not sure if this is something with the design of TFTP but when doing a put it does not let you create a file.



                              Solution:



                              Create the file before hand and give 777 rights. Run transfer again and it should work.






                              share|improve this answer













                              Not sure if this is something with the design of TFTP but when doing a put it does not let you create a file.



                              Solution:



                              Create the file before hand and give 777 rights. Run transfer again and it should work.







                              share|improve this answer












                              share|improve this answer



                              share|improve this answer










                              answered Jan 7 '16 at 5:50









                              michaelmichael

                              1




                              1























                                  0














                                  Please check the files mode bits.



                                  In my case, the tftp root directory is /opt/tftpboot/



                                  Using ls -l command, I could see the file mode was 600, so when I try to access tftp to get this file with anonymous, it reports an access violation.



                                  This may be the cause of this error. But there may be another reason for it.






                                  share|improve this answer






























                                    0














                                    Please check the files mode bits.



                                    In my case, the tftp root directory is /opt/tftpboot/



                                    Using ls -l command, I could see the file mode was 600, so when I try to access tftp to get this file with anonymous, it reports an access violation.



                                    This may be the cause of this error. But there may be another reason for it.






                                    share|improve this answer




























                                      0












                                      0








                                      0







                                      Please check the files mode bits.



                                      In my case, the tftp root directory is /opt/tftpboot/



                                      Using ls -l command, I could see the file mode was 600, so when I try to access tftp to get this file with anonymous, it reports an access violation.



                                      This may be the cause of this error. But there may be another reason for it.






                                      share|improve this answer















                                      Please check the files mode bits.



                                      In my case, the tftp root directory is /opt/tftpboot/



                                      Using ls -l command, I could see the file mode was 600, so when I try to access tftp to get this file with anonymous, it reports an access violation.



                                      This may be the cause of this error. But there may be another reason for it.







                                      share|improve this answer














                                      share|improve this answer



                                      share|improve this answer








                                      edited Aug 10 '17 at 11:11









                                      Zanna

                                      50.9k13137241




                                      50.9k13137241










                                      answered Aug 10 '17 at 7:42









                                      user723651user723651

                                      1




                                      1























                                          0














                                          Troubleshooting TFTPD Server on Ubuntu 14.0.4 by Dayanand Ambawade



                                          Step-1: Edit /etc/inetd.conf



                                          tftp dgram udp wait nobody /usr/sbin/tcpd /usr/sbin/in.tftpd /srv/tftpboot



                                          Step-2: Write script for tftpd



                                          sudo nano /etc/xinetd.d/tftp



                                          service tftp



                                          {
                                          protocol = udp
                                          port = 69
                                          socket_type = dgram
                                          wait = yes
                                          user = nobody
                                          server = /usr/sbin/in.tftpd
                                          server_args = /srv/tftpboot -s
                                          disable = no
                                          }


                                          Step-3: Create Directory and set the permissions



                                          sudo mkdir /srv/tftpboot
                                          sudo echo "Test TFTP Server" > /srv/tftpboot/test.txt
                                          sudo chmod 777 -R /srv/tftpboot
                                          sudo chown -R nobody.root /srv/tftpboot


                                          Step-4: Start service



                                          sudo service xinetd restart
                                          sudo service inetutils-inetd restart


                                          Step-5: Test Server



                                          echo "get test.txt" | tftp 127.0.0.1
                                          cat test.txt
                                          Test TFTP Server


                                          Hopefully this will solve the problem.
                                          Regards






                                          share|improve this answer






























                                            0














                                            Troubleshooting TFTPD Server on Ubuntu 14.0.4 by Dayanand Ambawade



                                            Step-1: Edit /etc/inetd.conf



                                            tftp dgram udp wait nobody /usr/sbin/tcpd /usr/sbin/in.tftpd /srv/tftpboot



                                            Step-2: Write script for tftpd



                                            sudo nano /etc/xinetd.d/tftp



                                            service tftp



                                            {
                                            protocol = udp
                                            port = 69
                                            socket_type = dgram
                                            wait = yes
                                            user = nobody
                                            server = /usr/sbin/in.tftpd
                                            server_args = /srv/tftpboot -s
                                            disable = no
                                            }


                                            Step-3: Create Directory and set the permissions



                                            sudo mkdir /srv/tftpboot
                                            sudo echo "Test TFTP Server" > /srv/tftpboot/test.txt
                                            sudo chmod 777 -R /srv/tftpboot
                                            sudo chown -R nobody.root /srv/tftpboot


                                            Step-4: Start service



                                            sudo service xinetd restart
                                            sudo service inetutils-inetd restart


                                            Step-5: Test Server



                                            echo "get test.txt" | tftp 127.0.0.1
                                            cat test.txt
                                            Test TFTP Server


                                            Hopefully this will solve the problem.
                                            Regards






                                            share|improve this answer




























                                              0












                                              0








                                              0







                                              Troubleshooting TFTPD Server on Ubuntu 14.0.4 by Dayanand Ambawade



                                              Step-1: Edit /etc/inetd.conf



                                              tftp dgram udp wait nobody /usr/sbin/tcpd /usr/sbin/in.tftpd /srv/tftpboot



                                              Step-2: Write script for tftpd



                                              sudo nano /etc/xinetd.d/tftp



                                              service tftp



                                              {
                                              protocol = udp
                                              port = 69
                                              socket_type = dgram
                                              wait = yes
                                              user = nobody
                                              server = /usr/sbin/in.tftpd
                                              server_args = /srv/tftpboot -s
                                              disable = no
                                              }


                                              Step-3: Create Directory and set the permissions



                                              sudo mkdir /srv/tftpboot
                                              sudo echo "Test TFTP Server" > /srv/tftpboot/test.txt
                                              sudo chmod 777 -R /srv/tftpboot
                                              sudo chown -R nobody.root /srv/tftpboot


                                              Step-4: Start service



                                              sudo service xinetd restart
                                              sudo service inetutils-inetd restart


                                              Step-5: Test Server



                                              echo "get test.txt" | tftp 127.0.0.1
                                              cat test.txt
                                              Test TFTP Server


                                              Hopefully this will solve the problem.
                                              Regards






                                              share|improve this answer















                                              Troubleshooting TFTPD Server on Ubuntu 14.0.4 by Dayanand Ambawade



                                              Step-1: Edit /etc/inetd.conf



                                              tftp dgram udp wait nobody /usr/sbin/tcpd /usr/sbin/in.tftpd /srv/tftpboot



                                              Step-2: Write script for tftpd



                                              sudo nano /etc/xinetd.d/tftp



                                              service tftp



                                              {
                                              protocol = udp
                                              port = 69
                                              socket_type = dgram
                                              wait = yes
                                              user = nobody
                                              server = /usr/sbin/in.tftpd
                                              server_args = /srv/tftpboot -s
                                              disable = no
                                              }


                                              Step-3: Create Directory and set the permissions



                                              sudo mkdir /srv/tftpboot
                                              sudo echo "Test TFTP Server" > /srv/tftpboot/test.txt
                                              sudo chmod 777 -R /srv/tftpboot
                                              sudo chown -R nobody.root /srv/tftpboot


                                              Step-4: Start service



                                              sudo service xinetd restart
                                              sudo service inetutils-inetd restart


                                              Step-5: Test Server



                                              echo "get test.txt" | tftp 127.0.0.1
                                              cat test.txt
                                              Test TFTP Server


                                              Hopefully this will solve the problem.
                                              Regards







                                              share|improve this answer














                                              share|improve this answer



                                              share|improve this answer








                                              edited Feb 6 at 17:50

























                                              answered Feb 6 at 17:29









                                              Dayanand AmbawadeDayanand Ambawade

                                              12




                                              12






























                                                  draft saved

                                                  draft discarded




















































                                                  Thanks for contributing an answer to Ask Ubuntu!


                                                  • Please be sure to answer the question. Provide details and share your research!

                                                  But avoid



                                                  • Asking for help, clarification, or responding to other answers.

                                                  • Making statements based on opinion; back them up with references or personal experience.


                                                  To learn more, see our tips on writing great answers.




                                                  draft saved


                                                  draft discarded














                                                  StackExchange.ready(
                                                  function () {
                                                  StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f599558%2ftftp-error-code-2-access-violation-tftp-not-working%23new-answer', 'question_page');
                                                  }
                                                  );

                                                  Post as a guest















                                                  Required, but never shown





















































                                                  Required, but never shown














                                                  Required, but never shown












                                                  Required, but never shown







                                                  Required, but never shown

































                                                  Required, but never shown














                                                  Required, but never shown












                                                  Required, but never shown







                                                  Required, but never shown







                                                  Popular posts from this blog

                                                  flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

                                                  Mangá

                                                  Eduardo VII do Reino Unido