File Copy Problem

Hello List,

Basic information:
OS: SuSE Linux 11.3
Logged in as user: ddavis (no special permissions)
User Group =100
User Home = /home/ddavis
User Name = ddavis

Development environment: Gambas2
File to print: myTEST_60447.pdf
File location: /home/ddavis/Upload
Permissions: rwx rwx rwx

After this file was created and printed on a local machine, it needs to be stored in a “common” directory on a server.
I tried to use curl -T filename destination (ftp://servername/uploads/) and curl responds with the error:
curl: Can’t open ‘/home/ddavis/Upload/myTEST_60447.pdf’!

I checked the directory/file permissions: both rwx rwx rwx
Issuing the same command from the command line gives the same result.

Why can this file be read by Acroread and Okular but not by curl???
I tried the ‘scp’ command like this:
scp filename servername/upload/
SCP responds with:
cp: cannot stat ‘myTEST_60447.pdf’: no such file or directory.

All help/suggestions are welcome. I am chasing my tail to figure it out and my project is on hold because of this.

Thanks in advance,
Dick Davis

Why not cut/paste (within CODE tags) the output of

grep ddavis /etc/passwd

It would convey the message without your interpretation (and much shorter).

Same, why not:

ls -l myTEST_60447.pdf

When copied/pasted including the prompt it would show what you wanted to show us including the working directory.

Again, why your story instead of copy/pasting your computer input/output?

This is not to ridicule you, but as you have something you do not understand when you stare at the screen, you might miss something we could see if you let us see as much of the facts as you have. Any interpretation you do might lead us to us be lured into the same wrong conclusion.

Same for this of course. I am allways realy suspicious of stories instead of facts. People (including me) tend to jump to conclusions somewhere and it needs a fresh girl/guy to look at the facts and ask stupid questions to avoid that. That is my experience in helping people to debug their programs for more then 30 years.

On 2010-12-04 20:06, hcvv wrote:

> Same for this of course. I am allways realy suspicious of stories
> instead of facts. People (including me) tend to jump to conclusions
> somewhere and it needs a fresh girl/guy to look at the facts and ask
> stupid questions to avoid that. That is my experience in helping people
> to debug their programs for more then 30 years.

You are correct. We need to see factual data, not the interpretation.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)

Sorry for the confusion, but tried to explain the situation as best as possible.

Here follows the suggested code/terminal copies:
tName = myTEST_60447.pdf, take my word for it.
Program code:
SHELL “cd /home/ddavis/Upload”
SHELL “curl -T /home/ddavis/Upload/” & tName & " ftp://pav.sd.net/upload/"
Debug Output in Gambas development environment:
curl: Can’t open ‘/home/ddavis/Upload/myTEST_60447.pdf’!
curl: try ‘curl --help’ or ‘curl --manual’ for more information

Output in Terminal:
<<
ddavis@acer:~> grep ddavis /etc/passwd
ddavis:x:1000:100:Dick Davis:/home/ddavis:/bin/bash
ddavis@acer:~>
ddavis@acer:~/Upload> ls -l myTEST_60447.pdf
ls: cannot access myTEST_60447.pdf: No such file or directory
ddavis@acer:~/Upload> l
total 80
drwxrwxrwx 2 ddavis users 4096 2010-12-02 14:43 ./
drwxrwxrwx 43 ddavis users 4096 2010-12-04 16:36 …/
-rwxrwxrwx 1 ddavis users 70273 2010-12-04 16:36 myTEST_60447.pdf *
ddavis@acer:~/Upload>
ddavis@acer:~/Upload> ls
myTEST_60447.pdf
ddavis@acer:~/Upload>
>>
This is the output after using scp:
<<
ddavis@acer:~/Upload> scp myTEST_60447.pdf pav.sds.net/uploads/
cp: cannot stat `myTEST_60447.pdf’: No such file or directory
ddavis@acer:~/Upload>
>>
As you see the intent is that the PDF goes to a remote location.
What would be the correct way and code be?
Thanks for your solution/suggestions.
Dick Davis

On 2010-12-05 00:06, skylineds wrote:
>
> Sorry for the confusion, but tried to explain the situation as best as
> possible.
>
> Here follows the suggested code/terminal copies:
> tName = myTEST_60447.pdf, take my word for it.

I think not - wait :slight_smile:

> ddavis@acer:~/Upload> l
> total 80
> drwxrwxrwx 2 ddavis users 4096 2010-12-02 14:43 ./
> drwxrwxrwx 43 ddavis users 4096 2010-12-04 16:36 …/
> -rwxrwxrwx 1 ddavis users 70273 2010-12-04 16:36 myTEST_60447.pdf *

What is that asterisk at the end? I believe it is part of the name.

See:

Code:

cer@Telcontar:~/tmp/aa> touch myTEST_60447.pdf
cer@Telcontar:~/tmp/aa> l
total 4
drwxr-xr-x 2 cer users 29 2010-12-05 01:06 ./
drwxr-xr-x 37 cer users 4096 2010-11-11 14:22 …/
-rw-r–r-- 1 cer users 0 2010-12-05 01:06 myTEST_60447.pdf

By the way, next time post code using code tags. Now, a guess. Your file is
marked executable (why?). let’s try the same.

Code:

cer@Telcontar:~/tmp/aa> chmod a+x myTEST_60447.pdf
cer@Telcontar:~/tmp/aa> l
total 4
drwxr-xr-x 2 cer users 29 2010-12-05 01:06 ./
drwxr-xr-x 37 cer users 4096 2010-11-11 14:22 …/
-rwxr-xr-x 1 cer users 0 2010-12-05 01:06 myTEST_60447.pdf*
cer@Telcontar:~/tmp/aa>

You notice there is no space between the “pdf” and the asterisk? In your
pasted text there is. Thus I think the real name of your file is
"myTEST_60447.pdf ", or in bash parlance "myTEST_60447.pdf\ ".


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)

Thanks Carlos.
Problem solved by changing the permissions to the directory.
Case closed.
Happy Hollidays.
Dick Davis

Nice you solved why I was sleeping. But again, for the next time: PLEASE PLEASE, use CODE tags around your computer text!