Project

General

Profile

Bug #23448

special charaters in filenames on disk not shared

Added by Tino Zidore over 3 years ago. Updated about 3 years ago.

Status:
Closed: User Config Issue
Priority:
Nice to have
Assignee:
Timur Bakeyev
Category:
OS
Target version:
Seen in:
Severity:
New
Reason for Closing:
Reason for Blocked:
Needs QA:
Yes
Needs Doc:
Yes
Needs Merging:
Yes
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:
ChangeLog Required:
No

Description

Hi

I have some problems finding the right way to share a lot of data I have put on my Freenas system from an old Apple Mac OS X Server with HFS+ formatting.
I have transferred the data using rsync using checksum without any problems.

Now I would like to share the data using SMB to both Windows and Mac OS X clients, but a lot of the files are missing on the sharepoints, but when I navigate on the freenas box I can see the files are there. I have narrowed the problem down to characters like æ,ø or å.

What am I doing wrong? Why are folders disappearing when the folder or file have a æ,ø or å in them?

do you need any other info, then let me know?


Related issues

Related to FreeNAS - Bug #26404: SMB not showing folder content on Mac OS XClosed: Insufficient Info2017-10-30

History

#1 Updated by Tino Zidore over 3 years ago

  • File debug-raw-20170419100728.txz added

#2 Updated by Bonnie Follweiler over 3 years ago

  • Seen in changed from Unspecified to 9.10.2-U2

#3 Updated by John Hixson over 3 years ago

  • Status changed from Unscreened to Screened
  • Target version set to 11.0

#4 Avatar?id=14398&size=24x24 Updated by Kris Moore over 3 years ago

  • Priority changed from No priority to Nice to have

#5 Updated by John Hixson over 3 years ago

  • Status changed from Screened to 15

I'm unable to reproduce this issue. I've created files with the characters you included in this ticket to both windows and mac clients. I do see some issues with the VFS fruit module, but not likely the issue here. If you can tell me exact filenames and under what share they are (and include another debug) then I can look further.

#6 Updated by John Hixson over 3 years ago

  • Target version changed from 11.0 to 11.1

#7 Updated by Tino Zidore over 3 years ago

10842

!Hi again

I think it will work for new files but I need it to work for the old ones I have transferred.
Is you can see in the attachment then the directory 14_Fejl_løsning is spelled correct in the web gui Shell, but connected through ssh is it not, it is 14_Fejl_l??sning. And it is even different through SMB sharing there it is 14_Fejl_løsning. See attached images.!

#9 Updated by John Hixson over 3 years ago

  • Assignee changed from John Hixson to Timur Bakeyev

Timur, can you take a look at this?

#10 Updated by Timur Bakeyev over 3 years ago

Encoding problems can be really hard to debug... So, let's roll back a bit and start from the basics. Can you, please, get a shell access to the FreeNAS box(over SSH or console) and execute following command in the directory which contains files/dirs in question:

# ls -1 -w
# ls -1 -w | od -t cxC
# ls -1 -b

and present the output here? Possibly, redirecting everything to the file and attaching it to the ticket would be easier and handier.

I suspect that the problem is in the conflict of UTF-16 and UTF-8 encodings. Also, as you mentioned OLD Mac, could it be that your FS was actually HFS, with it's old 8 bit ASCII encoding? Well, let's see the ls output first.

#11 Updated by Tino Zidore about 3 years ago

ls -1 -w gives the right result.
14_Fejl_løsning/

ls -1 -w | od -t cxC gives
0000260 _ F e j l _ l 303 270 s n i n g / \n
5f 46 65 6a 6c 5f 6c c3 b8 73 6e 69 6e 67 2f 0a

ls -1 -b gives the wrong result
14_Fejl_l\303\270sning/

#12 Updated by Timur Bakeyev about 3 years ago

Thanks a lot for your input! The good thing is that the encoding on the FS is UTF-8, the bad one is that it's still not clear, why this happens. Can you, please, provide updated debug information, as I can't find mentioned 14* file in the logs.

Also, while I can't insist on it, updating to FN11 could help to address certain issues that existed in the older versions of Samba(prior to 4.6.5).

#13 Updated by Tino Zidore about 3 years ago

  • File debug-raw-20170622093046.tgz added

Hi

I will not be upgrading to FN11 I tested it a few weeks back and there were a lot of this that didn't work yet.

I don't know if you will be able to find the file you ask in the logs it is from a archive which isn't visited that often.
But as wished a debug file is attached

#14 Updated by Timur Bakeyev about 3 years ago

Could it be that the filenames in question are mangled by Samba? Unfortunately, we don't have knob to control this setting, so can you try:

  1. Go to the console or SSH to the box
  2. Open for edit /usr/local/etc/smb4.conf file
  3. Add to the [global] section:
    mangled names = no
    
  4. Possibly change dos charset to CP850 - you can do that from GUI also, just do that BEFORE the edit
  5. Execute service samba_server restart

Check by running:

# testparm -vs|grep mangle

That should give you "no".

See, if you can find/operate on the files with Swedish characters normally.

#15 Updated by Tino Zidore about 3 years ago

It does give me "no" and it seems to be working. Thanks

#16 Updated by Timur Bakeyev about 3 years ago

  • QA Status deleted (Not Tested)

Hi, Tino! I want to check how are the things going? Just to make sure that:

  • disabling mangling fixed your problem.
  • re-enabling it brought it back.

If that's correct then you still should have the issue, as any re-configure of the SMB or reboot of the box would wipe out those changes to the smb4.conf. To make those changes persistent we need to add either a switch to the GUI or allow users to put their own configuration parameters.

#17 Updated by John Hixson about 3 years ago

Timur Bakeyev wrote:

Hi, Tino! I want to check how are the things going? Just to make sure that:

  • disabling mangling fixed your problem.
  • re-enabling it brought it back.

If that's correct then you still should have the issue, as any re-configure of the SMB or reboot of the box would wipe out those changes to the smb4.conf. To make those changes persistent we need to add either a switch to the GUI or allow users to put their own configuration parameters.

Global auxiliary parameters can be added in services->SMB->auxiliary parameters. Share parameters can be added in sharing->windows->sharename->advanced->auxiliary parameters.

#18 Updated by Timur Bakeyev about 3 years ago

I've looked at that config dozens of times, but noticed that there is an aux parameters input field for global config also only today :(

But anyhow, I want to make sure that disabling mangling fixes the problem, and, as I've seen other people using it to make Samba work with MacOS - we may put a separate checkbox for this.

#19 Updated by Timur Bakeyev about 3 years ago

Tino, can you, please, confirm, that disabling mangling fixed your problem?

#20 Updated by Tino Zidore about 3 years ago

Hi

I have added "mangled names= no" and with the U4 update it seems to be working on the test files and folders, so I imaging it is fixed.

#21 Updated by Dru Lavigne about 3 years ago

  • Status changed from 15 to 46

Timur: can this ticket be closed as resolved?

#22 Updated by Tino Zidore about 3 years ago

Yes do dont

#23 Updated by Tino Zidore about 3 years ago

Sorry I meant do write "Do That"

#24 Updated by Timur Bakeyev about 3 years ago

  • Status changed from 46 to Closed: User Config Issue
  • Target version changed from 11.1 to N/A

Thanks!

#25 Updated by Timur Bakeyev about 3 years ago

  • File deleted (debug-raw-20170419100728.txz)

#26 Updated by Timur Bakeyev about 3 years ago

  • File deleted (debug-raw-20170622093046.tgz)

#27 Updated by Timur Bakeyev about 3 years ago

  • Private changed from Yes to No

#28 Updated by Timur Bakeyev almost 3 years ago

  • Related to Bug #26404: SMB not showing folder content on Mac OS X added

Also available in: Atom PDF