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

Advertisement

Rich_UWO
Guest

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

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

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
27,226
Location:
Prague, Czechia

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

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.

Reply with quote

rich_UWO
Guest

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

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

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,226
Location:
Prague, Czechia

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

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.

Reply with quote

rich_UWO
Guest

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

>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

Reply with quote

Advertisement

You can post new topics in this forum