curl / Mailing Lists / curl-users / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

--create-file-mode

From: Johannes Leidheiser via curl-users <curl-users_at_cool.haxx.se>
Date: Fri, 5 Feb 2021 21:39:52 +0100

Hello Daniel,
Hello everybody,

I tried this new feature you kindly provided. Unfortunately it had no
effekt on the mode of the created file. Here is what I did. I used
Ubuntu 20.4.1 to compile the final version of curl 7.75.0 with the
following commands:

./configure --with-libssh2
make
sudo make install

and I got the following curl version without any warnings:

curl 7.75.0 (x86_64-pc-linux-gnu) libcurl/7.75.0 OpenSSL/1.1.1f
zlib/1.2.11 libssh2/1.8.0
Release-Date: 2021-02-03
Protocols: dict file ftp ftps gopher gophers http https imap imaps mqtt
pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: alt-svc AsynchDNS HTTPS-proxy IPv6 Largefile libz NTLM NTLM_WB
SSL TLS-SRP UnixSockets

I then tried to upload a file to localhost (same Ubuntu machine) several
times:

curl -k -u jojo:password --create-file-mode 777 -T Zahnpasta.txt
sftp://localhost/home/jojo/Documents/
curl -k -u jojo:password --create-file-mode 0777 -T Zahnpasta.txt
sftp://localhost/home/jojo/Documents/

The upload worked out without warnings but the file still has the 644
permissions .

What do I have to do to get this feature working?

Thanks in advance,

Johannes


-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2021-02-05