Workaround for samba code-page problem.

172 views
Skip to first unread message

robert

unread,
Oct 15, 2010, 7:03:03 AM10/15/10
to DealExtreme NAS
Hi,

Present Samba in Snake V1.x does not support national characters.
If you put a file or directory with Non Western EU character in name,
file or dir will be stored in file system, but Samba share will not
shown it. See issue 19. ( http://code.google.com/p/snake-os/issues/detail?id=19)

Problem shortly: there is no place in Snake Flash for other code-
pages.

There is a workaround written by Ted Chou12 description in the Issue
comments. Thanks Ted :)
The major idea to "remap" the related snake root directory to your HDD
which containing all other code-pages.

1. ssh to Snake
2. cd /usb/sda1 where your HDD or PEN-drive mounted.
3. wget http://snake-os.googlecode.com/files/codepages.tgz
4. tar -xvf codepages.tgz
5. mount -o bind /usb/sda1/codepages /bin/codepages
6. cp smb.conf /etc/smb.conf
7. Check /etc/smb.conf "character set" and "client code page" lines if
are they YOUR codepages.
If not, then replace according to /bin/codepages files.
8. /usr/share/snake/config save
9. restart smb service with webgui http://snake/ > Services > Samba >
restart

Enjoy. :)

Robert

nikgl

unread,
Oct 18, 2010, 4:19:53 AM10/18/10
to DealExtreme NAS
Thanx!
Good solution. I've tested it and works well with greek codepage.
I haven't tested restarting the NAS.
What happens?

On 15 Οκτ, 14:03, robert <robert1...@gmail.com> wrote:
> Hi,
>
> Present Samba in Snake V1.x does not support national characters.
> If you put a file or directory with Non Western EU character in name,
> file or dir will be stored in  file system, but Samba share will not
> shown it.  See issue 19. (http://code.google.com/p/snake-os/issues/detail?id=19)
>
> Problem shortly: there is no place in Snake Flash for other code-
> pages.
>
> There is a workaround written by Ted Chou12 description in the Issue
> comments. Thanks Ted :)
> The major idea to "remap" the related snake root directory to your HDD
> which containing all other code-pages.
>
> 1. ssh to Snake
> 2. cd /usb/sda1   where your HDD or PEN-drive mounted.
> 3. wgethttp://snake-os.googlecode.com/files/codepages.tgz
> 4. tar -xvf codepages.tgz
> 5. mount -o bind /usb/sda1/codepages /bin/codepages
> 6. cp smb.conf /etc/smb.conf
> 7. Check /etc/smb.conf "character set" and "client code page" lines if
> are they YOUR codepages.
>      If not, then replace according to /bin/codepages files.
> 8. /usr/share/snake/config save
> 9. restart smb service with webguihttp://snake/> Services > Samba >
> restart
>
> Enjoy. :)
>
> Robert

robert

unread,
Oct 19, 2010, 3:13:31 AM10/19/10
to DealExtreme NAS
Hi,

Thanks.

>works well with greek codepage.
Great.

> I haven't tested restarting the NAS.

mount -o bind /usb/sda1/codepages /bin/codepages
command have to issued in each restart.

I didn't put it in fstab, but should work.
Did you?

Robert
Message has been deleted

nikgl

unread,
Oct 22, 2010, 9:31:44 PM10/22/10
to DealExtreme NAS
Each time i try to put something in fstab it is erased on next reboot.
Maybe i do something wrong
I put this line with vi editor:
/usb/sda1/codepages /bin/codepages auto defaults 0 0
> > > Robert- Απόκρυψη κειμένου σε παράθεση -
>
> - Εμφάνιση κειμένου σε παράθεση -

robert

unread,
Oct 25, 2010, 5:53:33 AM10/25/10
to DealExtreme NAS
Hi,

Changes in root filesystem files, must be saved!

/usr/share/snake/config save or the web gui.

Robert

nikgl

unread,
Dec 15, 2010, 1:51:40 PM12/15/10
to DealExtreme NAS
Sorry for the late response but even when i managed to save the fstab
addition i couldn't make it work after restarting the nas.
Thanks to the comment of enigma.ru here
http://code.google.com/p/snake-os/issues/detail?id=19#c11
i did the following and voila! the change became permanent.

So in order to have permanent change, ssh the nas and go to edit the
script /etc/init.d/samba
adding the line after start() as below

start () {
mount -o bind /usb/sda1/codepages /bin/codepages
<<<<<<<<<-------- This is the line we have to insert
if [$SAMBA_ENABLE-eq 1]; then
KIND = "SMB"
echo "Starting $KIND services..."
smbd-D
RETVAL = $?
KIND = "NMB"
echo "Starting $KIND services..."
nmbd-D
RETVAL2 = $?
return $RETVAL
fi
}



finally write /usr/share/snake/config save
so as to save the changes.
Do restart and changes are there!
> > > - Εμφάνιση κειμένου σε παράθεση -- Απόκρυψη κειμένου σε παράθεση -

Vene

unread,
Dec 17, 2010, 10:00:05 AM12/17/10
to DealExtreme NAS
Hi,
does anybody knows hot to put Slavic code inside?
Codepage is 1250, but it is missing from codepage directory. And I
cant see half of my files!
Thank you.


On 15 pro, 19:51, nikgl <nikos....@gmail.com> wrote:
> Sorry for the late response but even when i managed to save the fstab
> addition i couldn't make it work after restarting the nas.
> Thanks to the comment of enigma.ru herehttp://code.google.com/p/snake-os/issues/detail?id=19#c11
> > > > > > There is aworkaroundwritten by Ted Chou12 description in the Issue
> > > > > > comments. Thanks Ted :)
> > > > > > The major idea to "remap" the related snake root directory to your HDD
> > > > > > which containing all other code-pages.
>
> > > > > > 1. ssh to Snake
> > > > > > 2. cd /usb/sda1   where your HDD or PEN-drive mounted.
> > > > > > 3. wgethttp://snake-os.googlecode.com/files/codepages.tgz
> > > > > > 4. tar -xvf codepages.tgz
> > > > > > 5. mount -o bind /usb/sda1/codepages /bin/codepages
> > > > > > 6. cp smb.conf /etc/smb.conf
> > > > > > 7. Check /etc/smb.conf "character set" and "client code page" lines if
> > > > > > are they YOUR codepages.
> > > > > >      If not, then replace according to /bin/codepages files.
> > > > > > 8. /usr/share/snake/config save
> > > > > > 9. restart smb service with webguihttp://snake/> Services > Samba >
> > > > > > restart
>
> > > > > > Enjoy. :)
>
> > > > > > Robert- Απόκρυψη κειμένου σε παράθεση -
>
> > > > - Εμφάνιση κειμένου σε παράθεση -- Απόκρυψη κειμένου σε παράθεση -
>
> > - Εμφάνιση κειμένου σε παράθεση -- Sakrij citirani tekst -
>
> - Prikaži citirani tekst -

romme...@gmail.com

unread,
Jan 20, 2011, 4:55:14 PM1/20/11
to dealextr...@googlegroups.com
Hi everybody,

Thanks for the hotfix. For PT-BR (I am from Brazil) we use:

character set = ISO8859-1
client code page = 850

Rommel
Reply all
Reply to author
Forward
0 new messages