CP: max source files number arguments for copy utility

Hello

Today we have a problem: We get this error when we try to copy over 32356 file in other folder.
[root@mail server-xv.ro]# cp -p office_23\@domain.ro/new/1* office\@domain.ro/.Inbox_2016_06_23/cur/
-bash: /bin/cp: Argument list too long

Solutions: run your command in a loop.

[root@mail server-xv.ro]# for file in office_23\@domain.ro/new/*; do cp -p “$file” office\@domain.ro/.Inbox_2016_06_23/cur/; done

And works very well.

Roundcubemail change default format for date_short

If you want to change time show for mail in roundcubemail you need to do next:

[root@mail ~]# grep date_short /var/www/html/roundcubemail/config/config.inc.php
//$config['date_short'] = 'D H:i';
$config['date_short'] = 'd-m-Y H:i';

But no effect ? Go to Settings —–> Preferences —-> User Interfaces and uncheck “Pretty Dates” like picture below.

Roundcubemail date format

Could not reliably determine the server’s fully qualified domain name Ubuntu?

If you get next error:

Restarting web server apache2
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
... waiting apache2:
Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName

Solution:
vi  /etc/apache2/conf.d/fqdn
or vi  /etc/apache2/conf-available/fqdn.conf  ( for Ubuntu 14.04 )
 add
ServerName server.domain.org
 a2enconf fqdn
 

Ubuntu server 12.04 LTS with GUI and xRDP.

Some people like GUI interface and some steps show here.

First step is to go comand line interface:

sudo apt-get update
sudo apt-get install ubuntu-desktop

install Gnome 
apt-get install gnome-shell

and reboot

After reboot we need to install xRDP

apt-get install xrdp

root@server-ubuntu-12:~# sysv-rc-conf --list | grep xrdp
xrdp 0:off 1:off 2:on 3:on 4:on 5:on 6:off

How to set locale in Ubuntu / Debian

After a clean Debian/Ubuntu install, I get the following error “LC_ALL to default locale: No such file or directory”.

Answer:  Type the following in terminal to get rid of that error,

sudo apt-get install language-pack-en-base

sudo dpkg-reconfigure locales

Other options it is to run:

 # locale-gen 

You will get

 Generating locales (this might take a while)...
   en_US.UTF-8... done
Generation complete. 

Enjoy.

Set WordPress file permissions and FS method

Metod to set file permissions and FS method in wordpress. To allow WordPress to configure wp-config.php during installation, update files during upgrades, and update the .htaccess file for pretty permalinks, give the server write permission on the files.

Change the owner of the wordpress directory and its contents to apache on Centos 7.  Keep the group as staff, a group to which your user account belongs and give write permissions to the group.

First Step.

[root@mailx work]# cd  /var/www/html
[root@mailx html]# chown -R apache.  wordpress-site2
[root@mailx html]# chmod -R g+w   wordpress-site2

Second Step.

Add this to your wp-config.php at the end file.

define(‘FS_METHOD’, ‘direct’);