[1.5.3/0.17] SAMBA, SMB, metadata not writen, move file not working

What is the problem?

moving a file from uploads to "gcode_share" directory return error.

printed files metadata or gcode analysis won't be writen on a gcode network repository.

(this stop being updated until 2020 June ...)

octoprint client starting time tremendously long [partially solved with a python 3 upgrade]
having some error in log about writing specific file in distant smb dir.

What did you already try to solve it?

scrolling logs file ...
changing the SMB mount point.
checking permission on dir.

my "ready-to-print" gcode repository is a shared folder onto a NAS device that use SMB V1.0 protocol.
(I just can't change that to V2.0 its a proprietary NAS from french internet access supplier).

For to have permanent acces to it in octoprint, I've mounted this directory thru a mount command in /etc/rc.local and is mounted in ~/.octoprint/uploads/gcode_share
so this dir appear in "files" under octoprint client.

so this globaly works, but not as expected.

Have you tried running in safe mode?

yes, no change.

Did running in safe mode solve the problem?


Complete Logs

will post requested still scrolling in it ...

Additional information about your setup

  • env.plugins.pi_support.model : Raspberry Pi 3 Model B Plus Rev 1.3
  • env.plugins.pi_support.octopi_version : 0.17.0
  • env.plugins.pi_support.throttle_state : 0x80000
  • env.python.pip : 21.0.1
  • env.python.version : 3.7.3
  • env.python.virtualenv : true
  • octoprint.safe_mode : false
  • octoprint.version : 1.5.3

Shared folder under SMB V1.0 with "all R/W permission" enable.

sudo mount -t cifs -o guest,vers=1.0 "// 2/Raspberry_Pi/octopi" /home/pi/.octoprint/uploads/gcode_share

in /etc/rc.local

something is telling me I have a "permission" problem or some "group" user for python can write the .metadata file and for it can move file thru directory but, I'm stuck.

I don't think this will work - OctoPrint's uploads folder can't be uploaded to outside of OctoPrint, due to metadata and analysis needed to keep track of the files.

You can one-way sync to the watched folder to avoid these issues. Add files to ~/.octoprint/watched and it can move them automatically to uploads, and create the necessary metadata.

seems it have worked as there is a .metadata.json in the subdir.

trouble I'm inquiring now are possibly shown in octoprint.log in :

2021-02-07 17:18:55,134 - octoprint.filemanager.storage - ERROR - Error while writing .metadata.json to /home/pi/.octoprint/uploads/gcode_share
Traceback (most recent call last):
  File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/filemanager/storage.py", line 1894, in _save_metadata
    to_bytes(json.dumps(metadata, indent=4, separators=(",", ": ")))
  File "/usr/lib/python3.7/contextlib.py", line 119, in __exit__
  File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/util/__init__.py", line 1210, in atomic_write
    os.chmod(fd.name, permissions)
PermissionError: [Errno 1] Operation not permitted: '/home/pi/.octoprint/uploads/gcode_share/tmpzbeb0w7_

this is the reason why I'm tinkering in SMB permission but I'm lost.

the mounted "gcode_share" in "uploads" dir should be transparent for octoprint it should be used as a directory, it normally can write in it, so what ... ??

what I've done.
removed the SMB mount from .octoprint/uploads
mounted SMB gcode_share repository in ~/gcode_share
manually copy all file from gcode_share to .octoprint/watched

this way, all works as it should, assuming every gcode file in watched have been moved to uploads automatically.

but, it doesn't work as I want. should be fine if only I can have access to this "watched" dir from every computer on my internal network.

I'm afraid I'm going to test mounting this watched folder as some SMB link to a NAS directory.