cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: FTP-upload and file permissions

From: Thomas Kühner <tjm_at_gmx.org>
Date: Sun, 23 Mar 2008 01:10:50 +0100

this works as well. just the leading slash was missing in the
statement posted:

> curl -Q '-SITE UMASK 777' -T '/Volumes/Tano/matrix.tgz' 'ftp://
> USER:PASS_at_SERVER/matrix.tgz'

"Seems, many ways are leading to Rome…"

pretty nice!
tom

Am 23.03.2008 um 00:55 schrieb Thomas Kühner:
> It's somehow strange! If I do this:
>
>> curl -Q 'SITE UMASK 755' -T '/Volumes/Tano/matrix.tgz' 'ftp://
>> USER:PASS_at_SERVER/matrix.tgz'
>
> the file uploaded has 022 as rights but not 755... *wondering*
>
> but this did the trick:
>
>> curl -Q '-SITE CHMOD 644 matrix.tgz' -T '/Volumes/Tano/matrix.tgz'
>> 'ftp://USER:PASS@SERVER/matrix.tgz'
>
>
> Thank you very much!!!
> Tom
>
> Am 23.03.2008 um 00:07 schrieb Dan Fandrich:
>> I don't think there's any standard FTP command to do that, but a
>> lot of
>> servers support the 'SITE UMASK' or 'SITE CHMOD' commands. Try
>> adding:
>>
>> -Q 'SITE UMASK 022'
>>
>> or:
>>
>> -Q '-SITE CHMOD 644 matrix.tgz'
>>

-----------------------------
Thomas Kühner
Kretzerstr. 20
DE-50733 Köln

Tel: 0221 - 292 40 16
Fax: 0221 - 292 47 09

http://www.macgix.de
Received on 2008-03-23