LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook
User Name
Password
Linux - Laptop and Netbook Having a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).

Notices


Reply
  Search this Thread
Old 08-21-2017, 01:58 AM   #1
amsats
LQ Newbie
 
Registered: Aug 2017
Posts: 4

Rep: Reputation: Disabled
TFTP : Error code 2: Access violation


Hi,
I am trying to set up a tftp server
I am accessing a tftp server from client.

- I am able to get a file from server.
- But I am not able to put a file on the server. Whenever I try to
do so, it is giving an error:

Error code 2: Access violation
-----------------------------------------------------------------
TFTP configuration in inetd.conf is as follows :

tftp dgram udp wait nobody /sbin/tftpd tftpd -s /var/tftp
------------------------------------------------------------------------------------
tftp file in init.d contains :

#!/bin/sh
#
# tftpd
#
case $1 in

start)
echo "tftpd starting"
/sbin/tftpd -s /var/tftp
;;

esac
--------------------------------------------------------------------------------------
TFTP. service file contains :

[Unit]
Description=Tftp Server
After=network.target

[Service]
Type=forking
ExecStart=/usr/sbin/inetd

[Install]
WantedBy=multi-user.target
----------------------------------------------------------------------------------------------
TFTP folder details :
owner: nobody
group: root
Permisiions: 777
--------------------------------------------------------------------------------------
What could be the reason for this error and how can I solve it?

Any help is highly appreciated.

Thank You
 
Old 08-21-2017, 06:56 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,703

Rep: Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896
Try adding the -c option which allows the creation of files.
 
Old 08-21-2017, 02:22 PM   #3
amsats
LQ Newbie
 
Registered: Aug 2017
Posts: 4

Original Poster
Rep: Reputation: Disabled
@michaelk

I tried adding but its not recognising.

I tried following and it shows error:

tftp dgram udp wait nobody /sbin/tftpd tftpd -s -c /var/tftp

tftp dgram udp wait nobody /sbin/tftpd tftpd -c /var/tftp

tftp dgram udp wait nobody /sbin/tftpd tftpd -c -s /var/tftp


Can you please tell me where to add the -c option.
 
Old 08-21-2017, 03:23 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,703

Rep: Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896
What distribution are you running?

xinetd replaced inetd many years ago. On SysV init systems tftp ran from xinetd so script in init.d is not necessary.

On CentOS 7 guide has you installing and running xinetd although there is a separate tftp service. Still determining what is required.

I had to add the -c option to both xinetd and tftp.service and allow write permissions to the tftp directory. Not sure if the first -c is required. I had to restart several time before the service would show it using the -c option. You also have to change selinux to allow writing if enabled.

Last edited by michaelk; 08-21-2017 at 11:27 PM.
 
Old 08-22-2017, 12:05 AM   #5
amsats
LQ Newbie
 
Registered: Aug 2017
Posts: 4

Original Poster
Rep: Reputation: Disabled
Hi @michaelk
I am using Ubuntu.
And I am using inetd.
There is no syslinux in my distro.

Last edited by amsats; 08-22-2017 at 12:06 AM.
 
Old 08-22-2017, 06:17 AM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,703

Rep: Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896
What version of Ubuntu are you running?

I would expect that if you used apt-get to install inetd that it would of actually installed xinetd.

How did you install tftp and inetd?

systemd not syslinux. I do not have a running Ubuntu system at the moment. systemd replaces xinetd as far as I know. There is no need for an init.d script.

I do not know how tftp is starting i.e xinetd/inetd, init.d script or systemd. What command did you run to start tftp server?

I suspect tftp is running from systemd. What is the output of the command?
systemctl status tftp
 
Old 08-28-2017, 01:51 AM   #7
amsats
LQ Newbie
 
Registered: Aug 2017
Posts: 4

Original Poster
Rep: Reputation: Disabled
Hi,

I have used following command to start tftp :

systemctl start tftp

I am using inetd service. My requirement is to use inetd not xinetd.

Name of service file is tftp.service
The location of service file is in /etc/systemd/system

The output of systemctl status tftp is

��● tftp.service - Tftp Server
Loaded: loaded (/etc/systemd/system/tftp.service; disabled; vendor preset: e)
Active: active (running) since Thu 2016-08-24 19:05:16 UTC; 5s ago
Process: 2422 ExecStart=/usr/sbin/inetd (code=exited, status=0/SUCCESS)
CGroup: /system.slice/tftp.service
��└��─2424 /usr/sbin/inetd

Apr 30 19:05:16 ubuntu systemd[1]: Starting Tftp Server...
Apr 30 19:05:16 ubuntu systemd[1]: Started Tftp Server.

Thank You
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
TFTP server returns "Error Code 0: Permission Denied" gi99 Linux - Networking 2 04-19-2011 06:17 AM
magic workstation0.94f instaler return access violation error Ubuntu9.10wine1.1.31 gnumaru Linux - Software 2 12-15-2009 03:40 AM
LXer: Microsoft: GPL Linux code release not due to violation LXer Syndicated Linux News 0 07-24-2009 03:40 PM
TFTP Error code 1: File not found Deepa V Linux - Newbie 2 02-07-2009 01:24 PM
Access Violation??? sh4k3y Linux - Software 3 03-25-2004 07:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook

All times are GMT -5. The time now is 05:00 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration