{"id":2036,"date":"2011-12-13T21:03:44","date_gmt":"2011-12-14T03:03:44","guid":{"rendered":"http:\/\/icesquare.com\/wordpress\/?p=2036"},"modified":"2016-03-02T11:56:59","modified_gmt":"2016-03-02T17:56:59","slug":"solvedtftp-error-code-2-access-violation","status":"publish","type":"post","link":"https:\/\/icesquare.com\/wordpress\/solvedtftp-error-code-2-access-violation\/","title":{"rendered":"[Solved]TFTP: Error code 2: Access violation"},"content":{"rendered":"<p>This post is an extension of my original post on TFTP: <a href=\"\/wordpress\/how-to-setup-tftp-on-ubuntu\/\" target=\"_blank\">How to Setup TFTP<\/a>. Although the post was written for Ubuntu, the same idea can be applied to all systems.<\/p>\n<p>So, here is our problem. You set up a TFTP server. It starts fine. You upload a file, it gives no error. Now, you try to download a file, it throws you an error:<\/p>\n<pre>\r\ntftp> get myfile.jpg\r\nError code 2: Access violation\r\n<\/pre>\n<p>If you google the error message, <strong>Error code 2: Access violation<\/strong> on the web, you&#8217;ve probably noticed many solutions, some of them are very creative, such as running a touch command to create the file before downloading it etc. Before you try those solutions, ask yourself this question first: Do you want to touch 100 files before you download 100 files?<\/p>\n<p>Anyway. I am not sure what cause the TFTP gives the error message: <strong>Error code 2: Access violation<\/strong>. However I never experienced this error in my system before with my configurations and settings. Therefore, I am going to share you my configurations for your reference.<\/p>\n<p>My TFTP Configuration:<\/p>\n<pre>\r\nservice tftp\r\n{\r\n   protocol = udp\r\n   port = 69\r\n   socket_type = dgram\r\n   wait = yes\r\n   user = nobody\r\n   server = \/usr\/sbin\/in.tftpd\r\n   server_args = var\/lib\/tftpboot -s\r\n   disable = no\r\n}\r\n<\/pre>\n<p>There are couple things you need to pay attention. First, my TFTP root directory is <strong>\/var\/lib\/tftpboot<\/strong>, and in my configuration file, I skip the first \/. Second, I put a flag, <strong>-s<\/strong> in the server_args. That helps to keep TFTP from complain.<\/p>\n<p><br \/>\nNext, the permission of the TFTP root directory plays an important role. Make sure that the permission and ownership are set correctly.<\/p>\n<pre>\r\nsudo chown -R nobody:nobody \/var\/lib\/tftpboot\r\nsudo chmo7 -R 777 \/var\/lib\/tftpboot\r\n<\/pre>\n<p>Now, you can simply restart the system:<\/p>\n<pre>\r\nsudo service xinetd stop\r\nsudo service xinetd start\r\n<\/pre>\n<p>and try to put a file and download it back:<br \/>\n<\/p>\n<pre>\r\ntftp localhost\r\ntftp> put myfile.jpg\r\nSent 56733279 bytes in 5.7 seconds\r\n\r\ntftp> get myfile.jpg\r\nReceived 56733279 bytes in 5.7 seconds\r\n<\/pre>\n<p>That&#8217;s it.<\/p>\n<p>Happy TFTP.<\/p>\n<p>&#8211;Derrick<\/p>\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This post is an extension of my original post on TFTP: How to Setup TFTP. Although the post was written for Ubuntu, the same idea can be applied to all <a class=\"more-link\" href=\"https:\/\/icesquare.com\/wordpress\/solvedtftp-error-code-2-access-violation\/\">Continue Reading &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":2176,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_hide_featured_image":false,"_jetpack_featured_image_duplicate_dismissed":0,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[94,144,6,69],"tags":[132],"class_list":["post-2036","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-computer-problems-computer-help-pc-support","category-sever-problem","category-technology","category-troubleshooting-technology","tag-tftp"],"jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/p1sqzr-wQ","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":1811,"url":"https:\/\/icesquare.com\/wordpress\/how-to-setup-tftp-on-ubuntu\/","url_meta":{"origin":2036,"position":0},"title":"How to Setup TFTP on Ubuntu 11.10","author":"Derrick","date":"November 23, 2011","format":false,"excerpt":"Recently I decide to jump into the pool of using diskless Ubuntu. Basically the client computer downloads the necessary files from the Ubuntu server every time during the boot. To keep things simple and easy, Ubuntu does that by using TFTP. So the first step is to set up a\u2026","rel":"","context":"In &quot;Computer Problems&quot;","block_context":{"text":"Computer Problems","link":"https:\/\/icesquare.com\/wordpress\/category\/technology\/computer-problems-computer-help-pc-support\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":653,"url":"https:\/\/icesquare.com\/wordpress\/mediawiki-error-parse-error-syntax-error-unexpected-t_namespace-expecting-t_string-in-usrlocalwwwapache22datawikiincludesnamespace-php-on-line-46\/","url_meta":{"origin":2036,"position":1},"title":"MediaWiki Error: &#8220;Parse error: syntax error, unexpected T_NAMESPACE, expecting T_STRING in \/usr\/local\/www\/apache22\/data\/wiki\/includes\/Namespace.php  on line 46&#8221;","author":"Derrick","date":"April 19, 2010","format":false,"excerpt":"[ad#adbrite] After upgrading my PHP to 5.3.2, I received the following error when accessing MediaWiki (1.6.12): Parse error: syntax error, unexpected T_NAMESPACE, expecting T_STRING in \/usr\/local\/www\/apache22\/data\/wiki\/includes\/Namespace.php on line 46 There are three solutions: Downgrade your PHP from 5.3 back to 5.2 Upgrade your MediaWiki to a newer version. Fix the\u2026","rel":"","context":"In &quot;Computer Problems&quot;","block_context":{"text":"Computer Problems","link":"https:\/\/icesquare.com\/wordpress\/category\/technology\/computer-problems-computer-help-pc-support\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":4083,"url":"https:\/\/icesquare.com\/wordpress\/rhel-7-mariadb-mysql-error-1018-hy000-cant-read-dir-of-errno-24\/","url_meta":{"origin":2036,"position":2},"title":"RHEL 7 \/ MariaDB \/ MySQL: ERROR 1018 (HY000): Can&#8217;t read dir of &#8216;.&#8217; (errno: 24)","author":"Derrick","date":"March 5, 2016","format":false,"excerpt":"Recently, I decided to upgrade a database server from RHEL 6 (CentOS 6) to RHEL 7 (CentOS 7), which involves switching from MySQL 5.5 to MariaDB 5.5. Our server hosts about 100 databases, when I was testing them individually, I didn't see any problem. However, when I ran the back\u2026","rel":"","context":"In &quot;Computer Problems&quot;","block_context":{"text":"Computer Problems","link":"https:\/\/icesquare.com\/wordpress\/category\/technology\/computer-problems-computer-help-pc-support\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3134,"url":"https:\/\/icesquare.com\/wordpress\/php-network-error\/","url_meta":{"origin":2036,"position":3},"title":"PHP Network Error","author":"Derrick","date":"February 21, 2013","format":false,"excerpt":"One of my PHP web applications stopped working today. After I investigated the issues, I noticed that this is a very famous, yet unsolved error. I have no idea why it happens, but I do have a work around solution for it. Basically, this article applies to you if you\u2026","rel":"","context":"In &quot;Computer Problems&quot;","block_context":{"text":"Computer Problems","link":"https:\/\/icesquare.com\/wordpress\/category\/technology\/computer-problems-computer-help-pc-support\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2812,"url":"https:\/\/icesquare.com\/wordpress\/freebsdhow-to-run-pecl-tokyo-tyrant-in-php-5-4\/","url_meta":{"origin":2036,"position":4},"title":"[FreeBSD]How to run PECL Tokyo Tyrant in PHP 5.4","author":"Derrick","date":"May 19, 2012","format":false,"excerpt":"After upgrading to PHP 5.4.3 (which is the first version of PHP 5.4 available in the FreeBSD port), I found that the pecl-tokyo_tyrant could not be compiled. Here is the error messages: cd \/usr\/ports\/databases\/pecl-tokyo_tyrant sudo make ===> pecl-tokyo_tyrant-0.6.0 cannot install: doesn't work with PHP version : 5 (Doesn't support PHP\u2026","rel":"","context":"In &quot;Computer Problems&quot;","block_context":{"text":"Computer Problems","link":"https:\/\/icesquare.com\/wordpress\/category\/technology\/computer-problems-computer-help-pc-support\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1516,"url":"https:\/\/icesquare.com\/wordpress\/cups-client-1-4-8-is-marked-as-broken-gnutls-does-not-support-threads-yet-disable-the-gnutls\/","url_meta":{"origin":2036,"position":5},"title":"cups-client-1.4.8 is marked as broken: gnutls does not support threads yet; disable the GNUTLS.","author":"Derrick","date":"September 6, 2011","format":false,"excerpt":"I saw this message twice on two machines on two different days, end up using the same way to fix it. Case 1: Samba My Samba was down today, so I tried to start it manually: \/usr\/local\/etc\/rc.d\/samba start And I got the following error message: Removing stale Samba tdb files:\u2026","rel":"","context":"In &quot;Computer Problems&quot;","block_context":{"text":"Computer Problems","link":"https:\/\/icesquare.com\/wordpress\/category\/technology\/computer-problems-computer-help-pc-support\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_featured_media_url":"https:\/\/icesquare.com\/wordpress\/wp-content\/uploads\/2011\/11\/TFTP_Small.png","_links":{"self":[{"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/posts\/2036","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/comments?post=2036"}],"version-history":[{"count":21,"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/posts\/2036\/revisions"}],"predecessor-version":[{"id":4081,"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/posts\/2036\/revisions\/4081"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/media\/2176"}],"wp:attachment":[{"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/media?parent=2036"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/categories?post=2036"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/tags?post=2036"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}