WinSCP complains at me when it tries to change the file modification time of a file it doesn't own. It says, "set times: Operation not permitted". I can remove this error message by unchecking "Preserve timestamp" in WinSCP settings (as described here https://stackoverflow.com/a/32482812/650004 ). But I want to keep this setting on. I want to configure SSHD (I think) on my server to allow setting the file modification time to anyone with write access to the file.

I looked in /etc/ssh/sshd_config and I can't see anything that might do it.

How can I do this?


It's how Linux permissions works.

No settings in SSH server can override that.

In other words your question is about Linux system, not about sshd, SCP, let only WinSCP.

  • Thanks. I happen to know, Martin Prikryl, that you are the author of WinSCP, so here's an idea. When the user gets this error, first delete the file, then upload it again. That way you own it. Just an idea. – Magmatic Feb 26 at 16:17
  • 1
    That's out of scope of this site and your question -- Anyway, you lose permissions and ownership to the file, what you may like, but others won't --- it's potential security issue. – Martin Prikryl Feb 26 at 16:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.