FTP no errors but file ZERO SIZED!


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers FTP no errors but file ZERO SIZED!
# 1  
Old 02-01-2012
FTP no errors but file ZERO SIZED!

Hi guys,

First of all this was working and stopped without reason. There is a file that it is transferred from a PC to a Unix machine (RHEL). It is not big, around 9k.

The user who performs the transfer has authority to the full path. Furthermore it is the owner of all objects.

We use WinSCP to perform the transfer. The transfer happened without showing any errors using WinSCP. I turned on logging using normal and debug1 options and you do not see any errors.

When the transfer is completed you see the size of the file transferred is 0 bytes. You opened and of course it is empty.

If I try to other directory or either fails with a "permission denied" (which makes sense) or it goes through but the file it is 0 bytes as well. Thinking that maybe could be an authorization issue even if should not be I added the user in question to the root group and the problem is the same.

Now, when I tried with root there are no problems at all. The file is transferred.

I can post whatever you need to see if I am missing something.

Thanks in advance.
# 2  
Old 02-02-2012
The test on ftp is for the command itself and not the transfer, in other words you will never find errors if ftp connection is successful...
It leaves you with making your own tests...

Good luck
Since we are in dummies, I will give you some possible alternatives:
You could add an CRC file and compare original vs transfered...
Some paranoids copy the files twice (both ways...) and compare the results...
# 3  
Old 02-02-2012
Your suggestion not sure how it can help me if I am saying I am able to FTP with root and not with a user who owns all file and all objects in the target path. I think there is something in the user that may be maxed out. Not sure if this exist tho. Maybe a user stack or something like that.
# 4  
Old 02-03-2012
I thought the subject was:
Quote:
FTP no errors but file ZERO SIZED!
, I missed the root part at the end (?) and thought you were on about files being transferred but empty and no ftp errors...
Quote:
The user who performs the transfer has authority to the full path. Furthermore it is the owner of all objects.
Do you mean he has access? But Is he the owner of the directory?
You have not given the permission settings on the directory, adding the user to the group root will not help if the directory has a 755 perms set...

Last edited by vbe; 02-03-2012 at 11:08 AM.. Reason: added about the thread subject...
# 5  
Old 02-03-2012
Are you usin WinSCP or ftp ? They are quite different.

Maybe try logging in normally on the remote server as the remote user and see if that user can create files in the problem directory. While you are there, please post a "ls -lad" of the directory file (if the user cannot access the directory file, then use the "root" account).
# 6  
Old 02-03-2012
Let me show you:

The target path is /app/ARSystem/prdus1/conf
The user is arsystem

Code:
[root@uslzua0001wsrv app]# ls -l
total 28
drwxrwxr-x 5 arsystem arusers  4096 Feb  1 17:42 ARSystem
drwx------ 2 arsystem arusers 16384 May 26  2010 lost+found
drwxr-xr-x 4 arsystem arusers  4096 Oct  1  2010 product
drwxrwxr-x 2 arsystem arusers  4096 Jul 27  2011 software

[root@uslzua0001wsrv ARSystem]# ls -l
total 12
-rw-r--r--  1 arsystem arusers    0 Feb  1 17:00 ar.conf
drwxrwxr-x 11 arsystem arusers 4096 Nov 15 06:33 AtriumCore7603
drwxrwxr-x  9 arsystem arusers 4096 Oct  2  2010 BMCRemedyITSMSuite
drwxrwxr-x 25 arsystem arusers 4096 Oct  1  2010 prdus1

[root@uslzua0001wsrv ARSystem]# ls -l
total 12
-rw-r--r--  1 arsystem arusers    0 Feb  1 17:00 ar.conf
drwxrwxr-x 11 arsystem arusers 4096 Nov 15 06:33 AtriumCore7603
drwxrwxr-x  9 arsystem arusers 4096 Oct  2  2010 BMCRemedyITSMSuite
drwxrwxr-x 25 arsystem arusers 4096 Oct  1  2010 prdus1

[root@uslzua0001wsrv ARSystem]# cd prdus1
[root@uslzua0001wsrv prdus1]# ls -l
total 256
drwxr-xr-x  8 arsystem arusers  4096 Oct  1  2010 api
drwxrwxr-x  8 arsystem arusers  4096 Oct  1  2010 approval
drwxrwxr-x  2 arsystem arusers  4096 Oct  1  2010 ardbcldap
drwxrwxr-x  2 arsystem arusers  4096 Oct  1  2010 arealdap
drwxrwxr-x  6 arsystem arusers  4096 Feb  3 01:09 AREmail
drwxrwxr-x  2 arsystem arusers  4096 Oct  1  2010 arsystem
-rw-rw-rw-  1 arsystem arusers 41758 Oct  4  2010 ARSystemInstalledConfiguration.xml
drwxrwxr-x  6 arsystem arusers  4096 Oct  1  2010 assignmentengine
drwxr-xr-x  2 arsystem arusers 12288 Jul 25  2011 bin
drwxrwxr-x  7 arsystem arusers  4096 Oct  1  2010 BMCARSystemInstallJVM
drwxrwxr-x  3 arsystem arusers  4096 Feb  1 17:04 conf

Also the user belongs to the arusers group
Code:
[root@uslzua0001wsrv prdus1]# groups arsystem
arsystem : arusers root

---------- Post updated at 07:37 ---------- Previous update was at 07:29 ----------

Quote:
Originally Posted by methyl
Are you usin WinSCP or ftp ? They are quite different.

Maybe try logging in normally on the remote server as the remote user and see if that user can create files in the problem directory. While you are there, please post a "ls -lad" of the directory file (if the user cannot access the directory file, then use the "root" account).
Thanks for your answer. I am using WinSCP.

test is the file created
Code:
[arsystem@uslzua0001wsrv conf]$ ls
aeufix63c.txt  ar.conf           ar.conf.backup  arufix63c.txt  test
apufix63c.txt  ar.conf.1.backup  ar.conf.bak     snmp
[arsystem@uslzua0001wsrv conf]$ ls -lad
drwxrwxr-x 3 arsystem arusers 4096 Feb  3 09:35 .

I know he can create the file because when FTP is completed the file (ar.conf) it is there but with 0 bytes of size.

Last edited by Scott; 02-03-2012 at 02:12 PM.. Reason: Please use code tags
# 7  
Old 02-03-2012
But we dont know the perms of /app...
look:
Code:
ra1z:/home/vbe $  cd dir
ra1z:/home/vbe/dir $ ll
total 0
drwxrwxrwx   3 vbe        bin             96 Feb  3 16:37 dor
ra1z:/home/vbe/dir $ ll -Rld *
drwxrwxrwx   3 vbe        bin             96 Feb  3 16:37 dor
ra1z:/home/vbe/dir $ ll -ld
drwx------   3 bin        bin             96 Feb  3 16:37 .
ra1z:/home/vbe/dir $ ll
total 0
drwxrwxrwx   3 vbe        bin             96 Feb  3 16:37 dor
ra1z:/home/vbe/dir $ ll dor
total 0
drwxrwxrwx   2 vbe        bin             96 Feb  3 16:37 dur
ra1z:/home/vbe/dir $ id
uid=0(root) gid=3(sys) groups=0(root),1(other),2(bin),4(adm),5(daemon),6(mail),7(lp),20(users)
ra1z:/home/vbe/dir $ cd dor
ra1z:/home/vbe/dir/dor $ ll
total 0
drwxrwxrwx   2 vbe        bin             96 Feb  3 16:37 dur
ra1z:/home/vbe/dir/dor $ exit
ra1z:/home/vbe $ cd dir/dor/dur
/usr/bin/ksh: dir/dor/dur: permission denied
ra1z:/home/vbe $ id
uid=200(vbe) gid=2(bin) groups=0(root),3(sys),20(users),60(oper),510(controlm),520(tipixgrp),525(a
fc)
ra1z:/home/vbe $ ll dir
dir unreadable
total 0
ra1z:/home/vbe $ ll -ld dir
drwx------   3 bin        bin             96 Feb  3 16:37 dir
ra1z:/home/vbe $

Ok I created an extreme case, but it shows that perms on parent directory CAN have some importance...

Last edited by vbe; 02-03-2012 at 11:48 AM..
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. What is on Your Mind?

The C64 is back, this time full-sized with a working keyboard for the dedicated retro home-computer

Retro Games has announced that the C64 is back, this time full-sized with a working keyboard for the dedicated retro home-computer fan, available December 2019. See also: CNN: Iconic 80s computer The Commodore 64 to return with fully-functional keyboard YouTube: The C64 | Trailer ... (2 Replies)
Discussion started by: Neo
2 Replies

2. Shell Programming and Scripting

Systemd errors of missing file “No such file or directory” inspite of file being present

The contents of my service file srvtemplate-data-i4-s1.conf is Description=test service for users After=network.target local-fs.target Type=forking RemainAfterExit=no PIDFile=/data/i4/srvt.pid LimitCORE=infinity EnvironmentFile=%I . . . WantedBy=multi-user.target (0 Replies)
Discussion started by: rupeshkp728
0 Replies

3. Shell Programming and Scripting

Shell scripting errors for ftp process

Hi i am facing problem in shell scripting for ftp process getting following errors here is the script & result vi GtpTxnlogs_ftp.sh "GtpTxnlogs_ftp.sh" 40 lines, 921 characters #!/usr/bin/bash ###################################################################################### #... (4 Replies)
Discussion started by: Sarmistha
4 Replies

4. HP-UX

[Solved] Unable to rename file in ftp server .Net:FTP perl

Hello All, I am trying to connect to ftp server and get the files. Also i need to rename the file in other ftp dir. rename method is not allowing me to rename the file in other dir. When i tried copy command by using net::FTP:FILE then perl says it is not installed. Can some body help me to... (2 Replies)
Discussion started by: krsnadasa
2 Replies

5. Shell Programming and Scripting

Variable Sized Array Length Question

I need to implement the following logic and need some expert help from UNIX community. These are the steps in my Shell script. 1. Analyze a file. 2. Extract all the ID's in that file. 3. Use the ID's from #2 to run another filter on the file. I've implemented # 1 and 2 using... (3 Replies)
Discussion started by: katwala
3 Replies

6. Shell Programming and Scripting

Perl: varible-sized arrays?

How do you store strings in a variable-sized array? Background: I wrote a program earlier today to work with a very large text file. I chose Perl because it lets me do some nice formatting on the text I grab, instead of just using a shell script to con'cat'enate egrep results. The program... (2 Replies)
Discussion started by: CRGreathouse
2 Replies

7. UNIX for Advanced & Expert Users

Using FTP to check whether file is completely FTP... plz find the description below

Hi, We have some clients who will place huge files in to one of the remote server. And the shell script written in our local server to retrieve client files (using FTP) placed on one of the remote server of ours by clients. My question Is there any FTP command/script to check from my local... (1 Reply)
Discussion started by: nmsrao
1 Replies

8. UNIX for Dummies Questions & Answers

ftp errors

I'm no Unix expert (so please excuse any misuse of Unix vocabulary or terminology) and I have an issue that is bugging me. I basically have a scheduled task which uploads and then downloads some files for me using ftp. Everything was (mostly) working fine until last week. Suddenly it refuses... (1 Reply)
Discussion started by: Approx.Purified
1 Replies

9. Shell Programming and Scripting

How to find out Errors in FTP Scripts

Hi Please let me know is there any way through which I can find out errors & do debugging in FTP scripts. Thanks Sourabh TCS (1 Reply)
Discussion started by: sourabhshakya
1 Replies

10. Shell Programming and Scripting

trapping errors while using FTP.

Hello, I have the following shell script to perform ftp: ftp -n $HOST<<EOD quote USER $USER quote PASS $PASS lcd $outputd cd $dir binary put *.zip quit EOD If any error is generated from this script then how to trap the error. For ex: let's say we entered wrong password then the... (5 Replies)
Discussion started by: radhika
5 Replies
Login or Register to Ask a Question