[Thông báo bảo mật quan trọng] Phát hiện các trang web giả mạo Qfinder Pro. Tìm hiểu thêm >

Sometimes I get an error code -43 when attempting to access files in a shared folder while using Finder in macOS via SMB. What causes this?


Last modified date: 2019-03-13

In the screenshot above, Finder is attempting to access (via SMB) the directory “1_ã” in a shared folder and create a subfolder, which results in the error. This happens because the character “ã” is encoded using Normalization Form D (NFD), which is the “Canonical Decomposition” Unicode normalization form.
 
On the client end, however, Finder sends the request using Normalization Form C (NFC), the “Canonical Composition” form. Therefore, the NAS server cannot recognize the directory name or find the directory, so the server reports the error.

This difference may also cause some files in folders with names containing letters from the NFD form to become invisible and uneditable. Operations like renaming, creating, or editing files in this kind of folder could fail.

This error is a result of the server and client using two different Unicode normalization forms. When a user tries to access a shared folder on the NAS server via SMB, the client sends a request to find out what files are in the directory. Upon receiving the request, the NAS server sends all the filenames in the directory to the client. The problem arises when the filenames use a different Unicode normalization form – in this case, NFD on the server end and NFC on the client end. This occurs when the client chooses a different form when saving files to the NAS server. When the client receives the filenames, it asks the server to display these files or requests that a new file be created in the directory. The encoding format of the request depends on the settings on the client end. If the client’s request is a different format than the format used on the server, then the server will not be able to find the files or directories, and report the error.

 
However, if you want to convert NFD form filenames to the NFC form for files stored on the NAS, you can use a tool called convmv. Follow the steps below to install convmv.

  1. Log in to the NAS and go to App Center.
  2. Install Perl.
  3. Go to https://www.j3e.de/linux/convmv/ and download convmv.
  4. Save the file to a directory on the NAS. (E.g., shared folder, Public)
  5. Open Terminal and establish an SSH connection to log in to the NAS.
  6. Enter the folder path where convmv is saved.
    Command input: Run: cd /share/Public
  7. Extract the file.
    Command input: Run: tar -xvf convmv-2.05.tar.gz
  8. Enter the folder path where the extracted files are saved.
    Command input: Run: cd convmv-2.05
  9. Ensure that convmv is executable.
    Command input: Run: chmod a+x convmv
  10. Modify the Perl shell path for the NAS.
    Command input: Run: sed -i -e'1c\\#\!\/opt\/bin\/perl' convmv
  11. Convert the filenames.
    Command input: Run: ./convmv -r --nfc --nosmart -f UTF-8 -t UTF-8 --notest

Note:
These instructions are based on QTS 4.3.6 firmware with an x86_64 platform. Attempting these steps using previous firmware versions may produce different results. For example, the Perl shell path may differ in step 10, so you may need to replace it with the correct path.
 
These instructions are not applicable to ARM-based models.


References:
https://en.wikipedia.org/wiki/Unicode_equivalence#Errors_due_to_normalization_differences
https://en.wikipedia.org/wiki/Unicode_equivalence#Normalization
https://www.j3e.de/linux/convmv/
https://linux.die.net/man/1/convmv
http://unicode.org/reports/tr15

Was this article helpful?

33% of people think it helps.
Thank you for your feedback.

Please tell us how this article can be improved:

If you want to provide additional feedback, please include it below.

Chọn thông số kỹ thuật

      Xem thêm Thu gọn
      Chọn quốc gia hoặc khu vực của bạn
      open menu
      back to top