cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-users Mailing List Archives

Re: FTP-upload and file permissions

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Sat, 22 Mar 2008 18:22:41 -0700

On Sun, Mar 23, 2008 at 12:55:35AM +0100, Thomas Kühner wrote:
> 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*

The umask is bitwise ANDed with the inverse of the value with which the
file is created. So, if it's created as 0666 then a umask of 0755 will
end up with permissions of 0666 & ~0755 = 022. Whereas a umask of 022
(which is a reasonable value) will give you permissions of 0666 & ~022 = 0644.

>>> Dan

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved
Received on 2008-03-23

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET