1
1
I want to overwrite a file having permissions 777 but the directory in which file is placed has permissions 755. So it is not allowing to do so.
1
1
I want to overwrite a file having permissions 777 but the directory in which file is placed has permissions 755. So it is not allowing to do so.
0
I suggest changing the permissions on the directory.
A short recap of your post with irrelevant parts left out:
I want to WRITE a file ... to a directory which is not writable for anyone bar the users. I am assuming that you are not logged in as that specific user.
That is, the 755 rights are:
Ergo only the user which own the directory is allowed to write to it. You might want to replace a writable file in that directory but that is the same as writing to a public dairy (777, not locked) in a locked cabinet. It fails because the cabinet is locked.
(If you think: why should I write to the directory and not just the file: The directory will be updated with things like last accessed, size, ....)
Other things which I assumed:
0
Your question is pretty vague.
But I would assume you are having the problem because WinSCP tries to transfer to a temporary file first, what conflicts with your lack of create-file permissions.
Turn off Transfer Resume/Transfer to Temporary Filename preference option in WinSCP:
https://winscp.net/eng/docs/ui_pref_resume
Can include an exact error message you are getting or even better a piece of log file? – Martin Prikryl – 2014-10-30T07:23:20.003