Octoprint Windows 10 Watched Folder [Errno 13]

When adding files to my watched folder (set as a shared folder across the network with access to everyone) the gcode file will either have the filetype changed to .failed or not go through at all. This would be easier to find the problem if the incident were consistent as it is not.

My OctoPrint is hosted on a Windows 10 OS, here is the log error when trying to upload into the watched folder.

2019-06-17 17:38:01,727 - octoprint.server.util.watchdog - ERROR - There was an error while trying to mark C:\OctoPrint\Watched\3DBenchy.gcode as failed in the watched folder
Traceback (most recent call last):
  File "c:\octoprint\venv\lib\site-packages\octoprint\server\util\watchdog.py", line 110, in _upload
    shutil.move(path, "{}.failed".format(path))
  File "c:\python27\Lib\shutil.py", line 316, in move
    copy2(src, real_dst)
  File "c:\python27\Lib\shutil.py", line 144, in copy2
    copyfile(src, dst)
  File "c:\python27\Lib\shutil.py", line 96, in copyfile
    with open(src, 'rb') as fsrc:
IOError: [Errno 13] Permission denied: u'C:\\OctoPrint\\Watched\\3DBenchy.gcode'

For toubleshooting, I have checked permissions of the shared network folder (All good), and checked that the Server knows where the folder is and that it is a "Valid Path". Ive also tried uploading with and without the "actively poll the watched folder" option on.

Could it be that the Watched folder is not in the same folder as the Upload folder?

Octoprint version: 1.3.11
OS: Windows 10 Pro
Printer: Modix Big60
Formware: Marlin 1.1.9B

It says right there: "Permission Denied".

Looks like you've installed everything into the global space (c:\whatever) instead of under the user space (c:\Users\pi\whatever). Microsoft generally has a problem with this.

Verify which user this is trying to run as. Then that user needs write rights thoughout that folder structure. On my Raspberry, the writable area would be ~/.octoprint but it looks like you're using c:\octoprint here.

after reviewing all my permissions and checking correct folder locations, octoprint will poll and empty the watched file on boot process but when trying the same file again I get another permission denied message in the console.

2019-06-20 12:37:47,332 - octoprint.server.util.watchdog - ERROR - There was an error while processing the file C:\Users\Modix 1\AppData\Roaming\OctoPrint\watched\Test Wood 2.gcode in the watched folder
Traceback (most recent call last):
File "c:\octoprint\venv\lib\site-packages\octoprint\server\util\watchdog.py", line 92, in upload
File "c:\octoprint\venv\lib\site-packages\octoprint_PrintTimeGenius_init
.py", line 481, in new_add_file
return self.file_manager.original_add_file(destination, path, file_object, links, allow_overwrite, printer_profile, None, display)
File "c:\octoprint\venv\lib\site-packages\octoprint\filemanager_init
.py", line 487, in add_file
path_in_storage = self._storage(destination).add_file(path, file_object, links=links, printer_profile=printer_profile, allow_overwrite=allow_overwrite, display=display)
File "c:\octoprint\venv\lib\site-packages\octoprint\filemanager\storage.py", line 765, in add_file
File "c:\octoprint\venv\lib\site-packages\octoprint\filemanager\util.py", line 62, in save
shutil.move(self.path, path)
File "c:\python27\Lib\shutil.py", line 316, in move
copy2(src, real_dst)
File "c:\python27\Lib\shutil.py", line 144, in copy2
copyfile(src, dst)
File "c:\python27\Lib\shutil.py", line 96, in copyfile
with open(src, 'rb') as fsrc:
IOError: [Errno 13] Permission denied: 'C:\Users\Modix 1\AppData\Roaming\OctoPrint\watched\Test Wood 2.gcode'
2019-06-20 12:43:45,878 - octoprint.filemanager.analysis - INFO - Starting analysis of local:Test_Wood_2.gcode
2019-06-20 12:43:46,411 - octoprint.filemanager.analysis - INFO - Analysis of entry local:Test_Wood_2.gcode finished, needed 0.53s

It might help to do a little research into the entire rights management of Windows (since you are using it).

There are different aspects of rights. The one you appear to be missing now is called Modify.

I went the most obvious route of eliminating problems by granting the user "Everyone" meaning anyone on the network full access to the C:\ drive and still getting the same results even after rebooting. Could it be that python on windows runs as a specific user? I know that shared folders don't like to work across local windows accounts and ones on your Microsoft account so I will research that more also. It really confuses me that it will work perfectly once when uploading a file but after deleting off of OctoPrint's interface and out of the watch folder and trying again it does not go through. I understand you use Octoprint on a Pi and I also use it on one of my other machines. Running off a windows machine is new to me but we upgraded to house more processing power than the Pi can offer.

I began coding to Microsoft-based computers early in the '80s and as a software developer and I.T. professional, it was my "bread and butter" for decades. Now, I honestly don't have a working Windows computer available to me; I currently use macOS, Ubuntu (Linux) or similar.

In my humble opinion, Microsoft should now consider trashing their entire folder and files rights management and just use the Linux version instead (which is what Apple pretty much does).

If I did want to upgrade the processing power on the Raspi for this, I'd likely use something based on the Rock64 chip by Pine64. I like the electrical cost economy of these dedicated single-board computers (an ATX power supply on your PC here in California would cost over $100 to power it for a year versus about $6/year for a Raspi).