File saved over IP/SMB are corrupted. Is ROSE an alternative?

I shared with IP/SMB some folders from a USB drive attached to Miktotik and used also by ROS.

When I open and edit text files over IP/SMB with some text editors (e.g. VSCode) files become corrupted: they get a bunch \0 at the end.

This seems related to Mikrotik IP/SMB and some text editor, likely because of the behavior and SMB api calls of these editors while saving. The problem happens at least on CCR2004 and RB2009 7.12 and 7.12.1.

On CCR2004 I tried to install a samba container and the problem disappeared but it’s not something I can/want keep running just to be able edit text files sometimes, especially on RB5009.

Is ROSE suitable to share some folders of ROS-accessible storage with a possibly up-to-date SMB protocol?

I would like my USB drive stay usable by ROS for logs, user manager DB, containers storage and so on, with only some folders be shared, tipically those of the container configurations/data.

In ROS documentation I can’t find a way to export/share only few folders of the attached USB drive. Is this possible or ROSE is only for sharing a whole USB drive unused by ROS?

Any other idea to solve this issue?

Are you using macOS? There are some issues with SMB and macOS, like this http://forum.mikrotik.com/t/hap-ax3-slow-smb-transfers-with-macos-and-apple-tv/165136/1
Regarding different text editors, some editors doesn’t display or even strip special characters, like null (\0) in your case, but they are part file of content probably due to some SMB communication issue, not editor problem imho. You can check if this is SMB issue by dowloading same file (before editing over SMB) over Winbox and see if null charactes are in that file. Best way to examine files raw is with hex editor
MT (normis in linked topic) suggests to use ROSE storage SMB instead SMB embedded in ROS, but you cannot install ROSE on all devices due to lack of space on flash.

Windows Client.
VSCode Editor is working well over other SMB shares, issues only with Mikrotik/IP/SMB.
Many \0 appears at the end of file after saving to Mikoritk.
ROSE apparently is not a full replacemnet of IP/SMB, can’t be used for my need, doens’t allow to share a disk actively used by Router.

[____@____] /disk> set usb1 smb-export=yes
failure: could not unmount filesystem - probably somebody still uses it

Totalcmd + AkelPad
Not corrupted and Not \0