cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: SFTP commands

From: <nagarajan.sreenivasan_at_wipro.com>
Date: Wed, 2 Jul 2008 11:53:03 +0530

 
>>>>>What OS is the remote server running? What kind of filesystem is
the remote file on? sftp sets all the attributes >>>>>>of a file at
once and if one type of attribute fails to be set, then it could return
such an error. For example, >>>>>>changing the mode or UID of a file on
a DOS filesystem wouldn't work, and could conceivably cause this kind of
>>>>>>problem. Can you verify through the remote server logs whether it
is in fact sending a Permission denied error code?

                Remote server am running on linux platform. Both gfs and
local file system gives me the same error. And regarding the Error logs
I am not able to find any in the remote server in /var/log/secure or
/var/log/messages it has
Only connection and disconenction realted errors.

For now I have a hack:like would first change the file to 777
permission (ignore the error)

And then change the file to required permisison (what ever mentioned )
.I know it sounds weired :)))

-----Original Message-----
From: curl-library-bounces_at_cool.haxx.se
[mailto:curl-library-bounces_at_cool.haxx.se] On Behalf Of Dan Fandrich
Sent: Wednesday, July 02, 2008 8:36 AM
To: curl-library_at_cool.haxx.se
Subject: Re: SFTP commands

On Mon, Jun 30, 2008 at 02:37:47PM +0530,
nagarajan.sreenivasan_at_wipro.com wrote:
> The permissions are getting changed (the user has permission to
> change)(FTP works fine with out throwing any errors)
>
> But in sftp when the file has 555 or 444 permissison and we try to
> change any other permissions The permisison are changed but the
> following error occurs
>
> * Re-using existing connection! (#0) with host <hsotname>
> * Connected to <hsotname> (<hsotname>) port 22 (#0)
> * Sending quote commands
> * Attempt to set SFTP stats failed: Permission denied---->what is this

> error
> * Connection #0 to host <hsotname> left intact
> * Quote command returned error
> The value of the errorStatus ::.ChmodFile 21(from curl_
>
> should I have to set/configure some settings for the sftp user do let

> me know how to do it????

What OS is the remote server running? What kind of filesystem is the
remote file on? sftp sets all the attributes of a file at once and if
one type of attribute fails to be set, then it could return such an
error. For example, changing the mode or UID of a file on a DOS
filesystem wouldn't work, and could conceivably cause this kind of
problem. Can you verify through the remote server logs whether it is in
fact sending a Permission denied error code?

>>> Dan

-- 
http://www.MoveAnnouncer.com              The web change of address
service
          Let webmasters know that your web site has moved
Please do not print this email unless it is absolutely necessary. 
The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. 
WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. 
www.wipro.com
Received on 2008-07-02