-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Option --create-file-mode has no effect #6657
Comments
Is that an openssh SFTP server in the other end? What umask do you run that with? |
It's a default ubuntu installation. In my sshd_config I found the following line:
and no other config-files are included. So I assume I'm using openssh SFTP. My sshd-process runs as root and root has the umask 0022. |
Thanks, I can reproduce. Quite obviously my work on adding this option was only partial. PR coming up. |
Thanks, al lot! I copied the additional lines of tool_operate.c into my copy of 7.75.0, recompiled and it works! |
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
The text was updated successfully, but these errors were encountered: