SOLVED Set a default locale for all users when accessing terminal/ssh

garbintecnologia

Active Member
Mar 4, 2021
29
1
3
Brasil
cPanel Access Level
Root Administrator
Hi, I have a little problem that might be a locale issue.

When I access a file with the nano via terminal and this file has accent, it is not shown.

when querying the locale, the following is returned (access via user account):

1623504575356.png
1623504822553.png

So I set the root account locale to pt_BR.utf8

1623504641027.png
1623504778667.png

I would like to know if it is possible to assign this pt_BR.utf8 locale to all other users and to new users.

If so, how could I do it?

I would like a solution for this, as it affects editing data with accentuation via terminal.

Thank's
 

quietFinn

Well-Known Member
Feb 4, 2006
1,300
128
193
Finland
cPanel Access Level
Root Administrator
I think that changes in /etc/locale.conf will take effect after reboot only .
 

garbintecnologia

Active Member
Mar 4, 2021
29
1
3
Brasil
cPanel Access Level
Root Administrator
Issue resolved.

The issue itself was linked to CloudLinux and CageFS.

I received the following support from the staff:

Please try to add the locale configuration file (/etc/locale.conf) to /etc/cagefs/cagefs.mp and then run:
cagefsctl --force-update && cagefsctl --remount-all
After that, there was an error not finding the /etc/locale.conf path, so I was instructed to do the following:

Please try to create the following file:
# nano /etc/cagefs/conf.d/locale.cfg
[custom]
comment=locale.conf
paths=/etc/locale.conf

And run: cagefsctl --force-update
Now everything works as expected, even after restarting the server.

Thank you all.
 
  • Like
Reactions: cPJustinD