Score:1

Can't access folders with special characters on mounted windows cifs share

au flag

I've got an issue on a Debian(11.3) server we host, I mounted a windows server share through cifs and fstab but when I try to access or list a few folders which contains special characters like "" I have an error saying that the folder doesn't exist. Here is the mount arguments :

auto,user=,pass=,vers=3.0,iocharset=utf8,file_mode=0777,dir_mode=0777,noperm

I tried to change to cp850 and a few others, nothing changes. Here is the locale output :

LANG=fr_FR.UTF-8
LANGUAGE=
LC_CTYPE="fr_FR.UTF-8"
LC_NUMERIC="fr_FR.UTF-8"
LC_TIME="fr_FR.UTF-8"
LC_COLLATE="fr_FR.UTF-8"
LC_MONETARY="fr_FR.UTF-8"
LC_MESSAGES="fr_FR.UTF-8"
LC_PAPER="fr_FR.UTF-8"
LC_NAME="fr_FR.UTF-8"
LC_ADDRESS="fr_FR.UTF-8"
LC_TELEPHONE="fr_FR.UTF-8"
LC_MEASUREMENT="fr_FR.UTF-8"
LC_IDENTIFICATION="fr_FR.UTF-8"
LC_ALL=

Interesting fact, if i try to create a local folder on ext4 partition with the special character listed above it works and i can list it.

If I could settled with just renaming folders i would do it but there's 100% chance that the client will receive other folders like that regurlarly.

Thank in advance for any hint or help, I made quite a few searches and don't find solutions

Score:0
cn flag

Windows doesn’t use utf-8 for file name encoding. Thus, you cannot see window’s non-ascii folders and files properly from linux. You can change window’s default encoding to utf-8 but I’m not sure whether this option is available or not for Windows 2012R2. Please refer to this answer (intl.cpl method).

dave_thompson_085 avatar
jp flag
`chcp` only sets the encoding Windows uses on the _console_, it doesn't affect the filesystem.
cn flag
@dave_thompson_085 thanks for comment. I modified answer a bit for details.
chnateag avatar
au flag
Thank you for the answers i'll look into that
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.