Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Canon MAXIFY GX4050 – Scan to SMB fails on Unraid 7.3.4 but works with Windows

Featured Replies

Hi everyone,

I recently purchased a Canon MAXIFY GX4050 multifunction printer and would like to configure it to scan documents directly to an SMB network share on my Unraid server,

which serves as an import folder for Paperless-ngx.

My setup:

  • Unraid OS: 7.3.4

  • Printer/scanner: Canon MAXIFY GX4050

  • Configuration software: Canon Folder Setting Utility

  • Connection: SMB network share

  • Destination: Paperless-ngx import folder

Unfortunately, when running the connection test in the Canon Folder Setting Utility, the connection to the Unraid SMB share fails with the following error:

"Failed to connect to the folder. Check the settings."

As part of the troubleshooting, I successfully tested the setup using a dedicated Windows test account. However, the connection to Unraid still fails.

Has anyone successfully configured a Canon MAXIFY printer or a similar multifunction printer to scan directly to an Unraid SMB share?

Could this be related to SMB protocol compatibility, authentication methods, user permissions or another Samba-specific setting in Unraid?

I have attached screenshots of my configuration and the error message.

Any suggestions would be greatly appreciated.

Thank you in advance!

image.pngimage.pngimage.png

Your share settings look correct, so the next step is to find what the scanner needs that the default Samba settings don't allow. Please try these one at a time and run the connection test after each:

1. Check that the same username and password work from a PC: map \\192.168.178.130\paperless-eingang with the paperless-scanner user. This rules out a credentials problem.

2. Update the printer firmware if a newer version is available, since newer firmware sometimes improves SMB support.

3. Stop the array, go to Settings > SMB, set "Enable NetBIOS" to Yes, apply and start the array. This also enables SMBv1, which some scanners still need.

4. If it still fails, keep NetBIOS enabled, stop the array again, and add this line to Settings > SMB > SMB Extras:

ntlm auth = ntlmv1-permitted

By default Samba only accepts NTLMv2 logins, but a Windows PC still accepts the older NTLMv1. That could explain why the scanner works with Windows and not with Unraid.

Both settings lower SMB security, so if one doesn't help, set it back. If one does help, keep only what's needed. If none of this works, please run the connection test once more, then go to Tools > Diagnostics right away and post the zip here.

you forgot to show the settings for the created user "paperless-scanner"

Share settings need to be set to "private" security (ok as shown in the screenshot) and the user "paperless-scanner" needs read-write permissions (not shown yet).

(I would not recommend to test NTVLM-1 access anymore. Current Windows versions do not supply it anymore (even the grace period for tolerating it anymore is over) ).

Edited by MAM59

  • Author

Hi JorgeB and MAM59,

Thank you for your suggestions. I have performed the following tests:

  1. Successfully connected to the Unraid SMB share from Windows using the paperless-scanner account. Creating and deleting a test file worked.

  2. The printer firmware version is 5.030 and is up to date.

  3. NTLMv1 authentication was already permitted in the Samba configuration.

  4. I temporarily enabled detailed Samba logging and repeated the connection test.

Interestingly, the Samba log confirms that the Canon printer successfully negotiates SMB 3.1.1, authenticates using NTLMv2, connects to the share, creates tmp.txt and successfully writes 13 bytes.

A few seconds later, it reconnects and finds the temporary file. However, both sessions end with NT_STATUS_CONNECTION_RESET.

Despite these successful operations, the Canon Folder Setting Utility still reports that the connection to the folder has failed.

What could explain this discrepancy?

Thank you again for your help!

Alex

20 minutes ago, AlexSol said:

What could explain this discrepancy?

Hmm, not sure. could be a problem with "upper/lowercase" settings.

For instance the printer writes "Tmp.txt" but wants to read back "tmp.txt".

Or, the printer may have problems with "SMB Multichannel" support. Try to switch it off on UNRAID (it does not really have big impact on the performance) and see it it helps (if not, turn it back on)

Otherwise I am afraid we need a deep scan with wireshark that traces such a session (although it is all crypted, so its hard to decypher what is going on)

Edited by MAM59

The log shows that the protocol, authentication and permissions are working: the printer logs in with NTLMv2 over SMB 3.1.1 and writes the test file. The NT_STATUS_CONNECTION_RESET at the end of each session is usually just the printer closing the connection without a clean logoff, which is common with embedded devices, so I wouldn't focus on that. It also means the NetBIOS/SMBv1 and NTLMv1 changes aren't needed, so if you changed any of them for this, you can set them back.

One thing that could explain the failure: this share is the Paperless-ngx consume folder, and Paperless-ngx can also import plain text files. If Paperless picks up tmp.txt between the printer's write and its follow-up check, which usually reads the file back and/or deletes it, the printer may report the test as failed.

To check:

1. After a failed test, see whether tmp.txt is still in the share, and whether Paperless has a new document named "tmp" or its log mentions consuming tmp.txt.

2. Stop the Paperless container for a moment and run the connection test again.

3. Or create a test share with the same settings and user, and run the test against it.

If the test passes with Paperless stopped or against the test share, the Unraid side should be fine. You can then run the test with Paperless stopped and start it again afterwards. Normal PDF scans should then be imported as usual. Paperless may also have an option to ignore specific file names, see its documentation for that.

If it still fails with Paperless stopped, please post the Samba log lines from the second session, from the connect to the reset, especially any open or delete of tmp.txt and the status returned. Also remember to set the Samba log level back to normal afterwards.

  • Author

Hi JorgeB and MAM59,

Thank you again for your suggestions.

Here are the results of the additional tests:

  • The temporary file tmp.txt remains in the share until the Canon Utility displays the error. Paperless-ngx does not import it.

  • Stopping the Paperless container does not resolve the issue.

  • Creating a separate SMB share (canon-test) with identical permissions does not resolve the issue either.

  • SMB Multichannel is already disabled.

  • The Samba logs show no discrepancy in the capitalization of tmp.txt.

I have attached the requested Samba log excerpt from the failed connection test with Paperless stopped, including the second session from connection to reset.

Interestingly, the printer successfully locates and opens tmp.txt, and the file is closed with NT_STATUS_OK. However, the Canon Folder Setting Utility still reports a connection failure.

Do you see anything unusual in the second session that could explain this behavior?

Thank you for your continued support!

Canon_Unraid_SMB_Log_2026-11-30_2022.txt

Edited by AlexSol

hmm yeah there are NT_STATUS_CONNECTION_RESET lines, but always AFTER the session is (successfully) closed before.

I'm not sure if this is an error at all.

How do you produce this log? I like to test a session here (that hopefully works) and compare the logs then.

  • Author

Hi MAM59,

I enabled detailed Samba logging as follows:

  1. Stopped the Unraid array.

  2. Went to Settings → SMB → SMB Extras.

  3. Added these two lines:

log level = 3
logging = syslog
  1. Applied the settings and started the array again.

  2. Stopped the Paperless-ngx container to rule out any interference.

  3. Ran the connection test in the Canon Folder Setting Utility.

  4. Immediately afterwards, downloaded the diagnostic ZIP via Tools → Diagnostics.

The Samba log entries are contained in logs/syslog.txt inside the ZIP archive. I extracted the relevant entries from both SMB sessions initiated by the printer.

After completing the test, I removed the additional Samba logging settings again.

It would be very interesting to compare our results with a successful connection test on your system.

Thank you!

Ok, I did (more or less, this is a busy machine, hard to access a single file) the same and my log does not show any RESET for the session.

(I was unsure before, thats why I have asked)

So there IS something wrong on your side... But sadly, I am running out of ideas what it may be :-(

Dec 1 06:15:23 F smbd[4189330]: [2026/12/01 06:15:23.609548, 2] ../../source3/smbd/open.c:1292(open_file)

Dec 1 06:15:23 F smbd[4189330]: mam opened file Icons.reg read=Yes write=No (numopen=13)

Dec 1 06:15:29 F smbd[4189330]: [2026/12/01 06:15:29.469133, 2] ../../source3/smbd/close.c:1026(close_normal_file)

Dec 1 06:15:29 F smbd[4189330]: mam closed file Intel Graphics Driver 32.0.101.6795 (x64).exe (numopen=11) NT_STATUS_OK

Dec 1 06:15:29 F smbd[4189330]: [2026/12/01 06:15:29.476270, 2] ../../source3/smbd/close.c:1026(close_normal_file)

Dec 1 06:15:29 F smbd[4189330]: mam closed file FBEditor-0.6.9.7k.exe (numopen=10) NT_STATUS_OK

Dec 1 06:15:34 F smbd[4189330]: mam closed file Icons.reg (numopen=5) NT_STATUS_OK

Dec 1 06:15:34 F smbd[4189330]: [2026/12/01 06:15:34.845254, 3] ../../source3/smbd/smb2_service.c:917(close_cnum)

Dec 1 06:15:34 F smbd[4189330]: mam2024 (ipv4:192.168.0.170:64988) closed connection to service Filme

The last line shows that the windows computer (mam2024) has closed the connection to the share, before the User (mam) opened and closed some files.

The log shows the printer going through its whole test without Samba returning any error: in the first session it creates tmp.txt and writes it, and in the second session it finds the file and then deletes it (the info_level=1013 line is the delete request, and the close after it returns NT_STATUS_OK). So the write, read-back and delete steps all work on the Unraid side, and the CONNECTION_RESET lines only appear after each session has already ended. Since the printer still reports a failure, it's likely objecting to something in one of Samba's successful replies, and log level 3 doesn't show those.

A few things to try:

1. Save the scan destination anyway, if the utility lets you, and do a real scan to it. Sometimes the connection test fails while normal scanning works.

2. One possible cause is the share size. An array share can report many TB of total and free space, and some embedded devices can't handle large values, while a Windows PC disk is usually much smaller. To test, stop the array, add this to Settings > SMB > SMB Extras, start the array and run the connection test again:

max disk size = 1000000

That makes Samba report the shares as about 1TB. It doesn't limit what you can actually store, but it applies to all shares, so remove it again if it doesn't help. Also, how big is the disk that holds the Windows share that worked?

3. If it still fails, please repeat the test once with log level = 10 instead of 3 and post the complete lines of both printer sessions, unfiltered this time, since the first excerpt only had key events. Level 10 also logs each request the printer sends and Samba's reply, which should show what the printer checks last. It's very verbose, so remove it right after the test.

  • Author

Thank you for your suggestions.

Unfortunately, limiting the reported disk size to both 1 TB and 450 GB did not resolve the issue. The Windows test share was located on a 455 GB drive.

I have now captured both complete printer sessions with Samba log level 10. Authentication, file creation, writing 13 bytes, truncating the file to 1 byte, querying file information and deleting the file all succeed.

Both sessions negotiate SMB 3.1.1 and complete the logoff successfully before the connection reset occurs.

Interestingly, the printer queries basic, standard and internal file information, but does not appear to issue a filesystem capacity query.

Could one of the returned file metadata values be causing the Canon connection test to fail?

I have attached the relevant request/response sequence from both sessions. I excluded sensitive authentication data from the original level-10 log for security reasons.

canon-test-2-forum.txt

The log confirms that the share size isn't involved, since the printer never asks for it. The whole test is: write the file, cut it to 1 byte, then in the second session read three sets of file information (timestamps, size, and the file ID), and delete the file. Samba returns OK for all of it, and the printer never reads the file contents. So it's likely objecting to one of those returned values, as you suspected, and the Samba log doesn't show the values themselves.

Your share is array-only, so it's a user share. User shares go through Unraid's user share filesystem layer (shfs), and some file information, like the file ID, can differ from what the disk itself or an NTFS share on Windows reports. A quick way to test that is a disk share, which skips that layer:

1. Stop the array, go to Settings > Global Share Settings, set "Enable disk shares" to Yes, and start the array.

2. In the Shares tab, under Disk Shares, click a disk that has free space (for example disk1). Set SMB Export to Yes and Security to Private, and give paperless-scanner Read/Write.

3. In the Canon utility, point the destination to \\192.168.178.130\disk1 and run the connection test.

Important: while disk shares are enabled, never copy or move files between a disk share and a user share (for example from \\server\disk1\... to \\server\paperless-eingang\...), since that can lead to data loss. After the test, set the disk share export back to No, or disable disk shares again.

If it still fails, the next step would be a packet capture on the server. SMB3 traffic here is signed but not encrypted, so Wireshark can decode it. Unraid doesn't include tcpdump, but you can run it from a temporary container using the host network. Docker must be enabled. From the Unraid terminal:

docker run --rm --net=host -v /mnt/user/canon-test:/cap nicolaka/netshoot tcpdump -i br0 -s 0 -w /cap/canon.pcap host 192.168.178.144 and port 445

(If bridging is disabled in Settings > Network Settings, use -i eth0 instead of -i br0.)

Run the connection test, then press Ctrl+C. The container is removed automatically, and canon.pcap stays in the canon-test share. Open it in Wireshark and look at the replies to the three "GetInfo" requests and the "Create" replies for tmp.txt. Please don't post the capture file itself, since it includes the login exchange. Screenshots or the values from those replies are enough.

  • Author

I tested an exclusive share with confirmed exclusive access to bypass shfs, but the Canon connection test still failed.

I also captured the SMB traffic. All three GetInfo responses and all Create responses appear consistent.

  • Allocation Size: 4096

  • End of File: 1

  • File Attributes: 0x20

  • FileInternalInformation: 0x0028000000005253

  • QFid: identical across all three Create responses and matching the internal file ID.

I also noticed an unusual numeric hostname in the Tree Connect Request, despite entering the correct IP address in the Canon utility.

Please see the attached Wireshark screenshots.

  • Packets 24, 85 and 100: Create Responses, including QFid information.

  • Packets 88, 91 and 94: GetInfo Responses (Basic, Standard and Internal File Information).

Do you notice anything unusual in these responses?

Packet 100.png

Packet 85.png

Packet 24.png

Packet 94.jpeg

Packet 91.jpeg

Packet 88.jpeg

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.