cURL / Mailing Lists / curl-users / Single Mail

curl-users

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