Files uploaded to watched folder not automatically showing up in uploads folder until the refresh button is pushed

What is the problem?

Files uploaded to watched folder not automatically showing up in uploads folder until the refresh button is pushed.

The SD card on my pi died, so since pis have finally come down in price I also took this opportunity to upgrade to a pi4 instead of the 3 I had been using. I got everything configured and permissions set so that the watched folder was visible on my network following the information from this post so I could easily upload files there from my slicer running on windows. This is the exact same way I had it setup before this hardware change and it worked perfectly.

The error from the logs is:

PermissionError: [Errno 1] Operation not permitted: '/home/pi/.octoprint/uploads/clip.gcode'
2023-09-08 21:27:22,990 - octoprint.server.util.watchdog - ERROR - There was an error while processing the file /home/pi/.octoprint/watched/Alien-Cover.gcode in the watched folder
Traceback (most recent call last):
  File "/home/pi/oprint/lib/python3.9/site-packages/octoprint/server/util/", line 118, in _upload
    added_file = self._file_manager.add_file(
  File "/home/pi/oprint/lib/python3.9/site-packages/octoprint/filemanager/", line 727, in add_file
    path_in_storage = self._storage(destination).add_file(
  File "/home/pi/oprint/lib/python3.9/site-packages/octoprint/filemanager/", line 894, in add_file
  File "/home/pi/oprint/lib/python3.9/site-packages/octoprint/filemanager/", line 72, in save
    os.chmod(path, permissions)
PermissionError: [Errno 1] Operation not permitted: '/home/pi/.octoprint/uploads/Alien-Cover.gcode'

The error makes it seem like the file is not getting automatically processed and copied to the uploads folder, but it is, and it shows up in the file list and I can print it, I just have to push the refresh button on the web ui first

This is more of an annoyance than anything else, and it's probably just a permission issue somewhere, but I've been unable to figure it out on my own. Aside from this, I got everything up and running within 30 min which is a real testament to how great octoprint is.

What did you already try to solve it?

chmod 777 on both the watched and uploads folder

drwxrwxrwx  2 pi pi 4096 Sep  9 08:18 uploads
drwxrwxrwx  2 pi pi 4096 Sep  9 08:17 watched

Have you tried running in safe mode?

Yes with the same results

Did running in safe mode solve the problem?


Systeminfo Bundle (88.0 KB)

Additional information about your setup

Just curious what slicer you are using that you can't just send your sliced file directly from it? Cura has a plugin and Prusa/Orca/Super Slicers have direct upload capabilities built in.

this seems to be the root of the issue, the pi user can't change the permissions of the file.

1 Like

You mean connect my computer to my printer and use the pc to send the gcode to the printer? My computer is on the other side of the house as the printer. I'm using the pi and octoprint so I can print without having to sneakernet the sd card back and forth.

Do you know how I can grant the pi user sufficient privilege to be able to change the permissions on those files I upload from my windows PC?

No, he meant to send the files from the slicer via the local network to the Pi with OctoPrint on it.

That's what I thought I was doing by having the watched folder mapped as a network location, then having my slicer default to save in that location.OOOOH, or do you mean by mapping the upload folder to the network instead of watched? I don't know why I didn't do that, I think I just assumed that 'watched' was the place to put things for octoprint to pick them up correctly and that maybe I wasn't supposed to upload directly to the 'upload' folder.... duh.

Either way I figured it out and the files get copied from watched to upload automatically and show up correctly in the file list. I was able to recover my old sd card enough to read the smb.conf and noticed that the tutorial I followed this time had only guest = Yes whereas my previous setup had that value set to No

No, literally getting a button in your slicer to send to OctoPrint without anything special with watched folder or the like with option to automatically start.

You tell me what slicer you use and I can show you a screenshot.

1 Like

I'm using a pretty old version of cura 4.8 specifically.

Sure lemme see a screenshot, I assume it's a cura plugin? However, I got the watched thing working, it was just a minor smb config tweak. This magic button still sounds interesting but also kind of similar to what I came up with the watch folder. I have it mapped on my pc, and then set as the default save location in cura, when I push the 'Save to file' in cura, it's already set to save to watched, then I just have to wait 10 seconds before it shows up in octoprint, and push the print button.

Correct, it is a Cura plugin from the marketplace and should be available for your version of Cura. It's called OctoPrint Connection and once installed you get additional options in the printer settings to tell it where you OctoPrint is and register.

Then when you slice up your files you get this option....