Topic "Can I change the flags used on the "open" statement of an upload operation?"

Author Message
Rich_UWO

Guest


Hi,

I am using the GUI version of Winscp 5.7.7 on Windows 10. When I try to
upload a file to a specific directory protected with nfsv4 acls, the upload
fails with a "Permission denied. Error code: 3 Error message from server:
Permission denied". When I use different clients, the upload succeeds. The
server logs show winscp attempting to open the file with the following flags:

open "/rich/shemp.log" flags WRITE,CREATE,TRUNCATE,EXCL mode 0666
sent status Permission denied

The other clients use flags like the following:

open "/rich/shemp.log" flags READ,WRITE,CREATE mode 0666

open "/rich/shemp.log" flags WRITE,CREATE,TRUNCATE mode 0755

and are successful. With Winscp, I am able to read the directory, delete
files from it, and over-write existing files. My questions are: Can I control
which flags are used on the open statement of an upload? In particular, can I
disable the EXCL flag? And can this be done using the GUI version of winscp?
What is the EXCL flag for?

Thanks.
Rich
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
Please attach a full session log file showing the problem (using the latest version of WinSCP).

To generate the session log file, enable logging, log in to your server and do the operation and only the operation that causes the error. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.
rich_UWO

Guest


Thanks for looking at this. Log is attached.
winscp.log (9.87 KB) Private file

Description: (none)

martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
The EXCL flag means that the server should fail the "create file" request, if a file with given name already exists.

Does it? In any case, your server rejects the request. Now WinSCP tries to read (supposedly existing) file attributes to present them on an overwrite confirmation (and would issue a "create file" request without EXCL flag, if an user confirms an overwrite). But your server rejects even the check for file attribute (SSH_FXP_LSTAT). And only that is, what finally makes WinSCP give up.

If you disable overwrite confirmations, WinSCP would not use the EXCL flag. But that's a hack, you should better fix your server.
rich_UWO

Guest


>If you disable overwrite confirmations, WinSCP would not use the EXCL flag. But that's a hack, you should better fix your server.

Thanks so much for looking into this. The "hack" will at least let us continue with
production until the ACL problem can be resolved.

Rich
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License