Music Banter - View Single Post - The Official Computer Tech Support Thread
View Single Post
Old 07-03-2021, 06:38 PM   #2204 (permalink)
SGR
No Ice In My Bourbon
 
SGR's Avatar
 
Join Date: Mar 2010
Location: /dev/null
Posts: 4,326
Default

Quote:
Originally Posted by Stephen View Post
Anyone used ssh from Windows to Linux and know much about perms? The problem I am having is writing to a network folder. My process was failing on file creation so I tried cp from the command line. The strange thing is the first try creates the file but leaves it empty and fails. If I try again with the empty file already there it is then able to write to it. Any ideas what might cause an issue like that?
Are you trying to copy the file from a Windows machine to a disparate Linux machine (VM or otherwise)? In that case, I'm guessing you're using something like pscp to do the copy?

have you tried making the path that you're writing to completely open in terms of permissions? e.g. chmod 777 /path/to/folder - it's possible that the issue could be coming from permissions on the folders that are parents to your target directory.

Have you messed around with the setuid/setgid bits?

This isn't an NFS share you're writing to, is it?

What kind of process do you have that's writing to this location? Is it a program? PHP? Python or something? Bash script set up as a cron job? For some reason, I remember having an issue very similar to this, with a PHP program doing a SFTP transfer using PHPSECLIB - not sure if it's at all related (I think it was a permissions issue), but if you haven't figured it out by now, I'll try to dig through my notes for ya. Let me know.
SGR is offline   Reply With Quote