LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Permission denied while trying to put the file using TFTP (https://www.linuxquestions.org/questions/linux-newbie-8/permission-denied-while-trying-to-put-the-file-using-tftp-854619/)

Rohit_4739 01-06-2011 08:54 AM

Permission denied while trying to put the file using TFTP
 
Hi,

I am trying to put a file from one linux machine to my other linux machine. There is absolutely no problem in downloading the file i.e. performing the "get" operation but when i try to upload or "put file" from my host1 to host2 it throws error "Error 0 Permission denied".

I am able to put files from host2 to host1 without any problem but not from host1 to host. Infact if i try to tftp even localhost on host2 it throws the same error. Here is my /etc/xinetd.d/tftp file for host2

service tftp
{
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -c -s /tftpboot
#disable = yes
disable = no
per_source = 11
cps = 100 2
flags = IPv4
}


And permissions on /tftpboot are 777

[root@LinuxServer /]# ls -ld /tftpboot/
drwxrwxrwx 2 root root 4096 Jan 6 05:21 /tftpboot/
[root@LinuxServer /]# ls -l /tftpboot/
total 16
-rwxrwxrwx 1 root root 11 Jan 6 06:16 new_test
-rwxrwxrwx 1 root root 12 Jan 5 06:02 test2

And the commant which i am using is :

[root@LinuxServer /]# tftp localhost -c put new_test
Error code 0: Permission denied


And ya here is /etc/sysconfig/selinux file is as under :

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - SELinux is fully disabled.
SELINUX=permissive
# SELINUXTYPE= type of policy in use. Possible values are:
# targeted - Only targeted network daemons are protected.
# strict - Full SELinux protection.
SELINUXTYPE=targeted



So could anyone please explain what is needed to be done. I would appreciate the help.

TIA

Rohit

acid_kewpie 01-06-2011 02:04 PM

Nothing to do with networking. Moved to Linux - Newbie.

jefro 01-06-2011 04:28 PM

Can you connect and list files at each? I think there is some other file that tells how tftp access is allowed too. I have only used tftp on qnx so I can't say for sure.

If I get this I tend to telnet to the other system and try a get from the original system I am on. See if that works. Be sure that the user you are connecting to is on the same boxes.


This I don't get either. "tftp localhost -c put new_test "

Why not tftp user@ipaddres then something? Why are you trying to connect to localhost?

eSelix 01-06-2011 05:22 PM

@jefro: tftp does not support listing files nor user accounts.

I checked this configuration (without SELinux) and it worked for me. If you suspect SELinux, disable it and check tftp again.


All times are GMT -5. The time now is 11:14 PM.