ELS - Easy Linux Security script

hs-server, try:
Code:
# mysql -e "use da_roundcube; source SQL/mysql.initial.sql;" -uda_admin -p`grep "^passwd=" /usr/local/directadmin/conf/mysql.conf | cut -d= -f2`

Or update the ELS and run --roundcube again :)
 
Last edited:
Warning: session_write_close() [function.session-write-close]: open(/tmp/root-tmp.f75e37/files/sess_Ch5bD,ZqkaBwRYUFPvtcEo9QH36, O_RDWR) failed: Permission denied (13) in /var/www/html/phpMyAdmin-2.9.2-all-languages/index.php on line 44

So I reckon I have to undo secure partitions? Then I can try and repair my mySQL tables which are apparently causing another issue! This does not seem to work too well with vBulletin and vbPortal, Figured you can repair tables from inside vB so that means my site is working. Just incase anyone else get's errors in vB just repair your tables!
 
Last edited:
/usr/local/bin/els: line 1304: syntax error near unexpected token `else'
/usr/local/bin/els: line 1304: ` else'
Latest version
 
Fixed in the new version. Who wants to update:
Code:
# cd /usr/local/els; rm -f els.sh; wget --output-document=els.sh http://servermonkeys.com/projects/els/els/els.sh; chmod +x els.sh;
 
dannygoh, thank you for the bug report. It is fixed in 2.0.3.14 :)
 
Then I can try and repair my mySQL tables which are apparently causing another issue! This does not seem to work too well with vBulletin and vbPortal, Figured you can repair tables from inside vB so that means my site is working. Just incase anyone else get's errors in vB just repair your tables!

Everything is working fine, tested on 1000+ servers. On your request, now the script includes repair tables function too.
 
Ok I appreciate this plugin I think it is cool but I am getting some errors. PhpMyAdmin cannot do anything as it cannot access /tmp also here are install errors I get:
This feature can disable dangerous PHP functions.
Proceed? (y/n): y
Backing up current configuration file...
Successfully backed up as /usr/local/els/bakfiles/php.ini-disable-functions.bak!
Modifying configuration file, disable_functions found...
Edit failed!
Restoring backup...
Backup restored.
PHP is NOT disabling dangerous PHP functions.

Failed loading /usr/lib/php/eaccelerator/eaccelerator.so: /usr/lib/php/eaccelerator/eaccelerator.so: cannot open shared object file: No such file or directory
Failed loading /usr/lib/php/eaccelerator/eaccelerator.so: /usr/lib/php/eaccelerator/eaccelerator.so: cannot open shared object file: No such file or directory

ELS can now install eAccelerator.
Proceed? (y/n): y
Downloading eAccelerator...
Download Successful!
MD5 matches.
Extracting...
Extraction Successful!
Failed loading /usr/lib/php/eaccelerator/eaccelerator.so: /usr/lib/php/eaccelerator/eaccelerator.so: cannot open shared object file: No such file or directory
configure.in:9: warning: underquoted definition of PHP_WITH_PHP_CONFIG
run info '(automake)Extending aclocal'
or see http://sources.redhat.com/automake/automake.html#Extending-aclocal
configure.in:32: warning: underquoted definition of PHP_EXT_BUILDDIR
configure.in:33: warning: underquoted definition of PHP_EXT_DIR
configure.in:34: warning: underquoted definition of PHP_EXT_SRCDIR
configure.in:35: warning: underquoted definition of PHP_ALWAYS_SHARED
acinclude.m4:19: warning: underquoted definition of PHP_PROG_RE2C
configure.in:65: error: possibly undefined macro: AC_PROG_LIBTOOL
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
configure: error: cannot run /bin/sh ./config.sub
make: *** No targets specified and no makefile found. Stop.
/bin/mkdir: cannot create directory `/usr/lib/php/eaccelerator': File exists
mv: cannot stat `./modules/eaccelerator.so': No such file or directory
eAccelerator installation/update complete.
Restarting Apache...
Stopping httpd: [ OK ]

Failed loading /usr/lib/php/eaccelerator/eaccelerator.so: /usr/lib/php/eaccelerator/eaccelerator.so: cannot open shared object file: No such file or directory
 
S25, thank you, this bug was only with DirectAdmin, fixed in 3.0.3.15 :)
 
Nice one :)
Does that mean I just have to update now and it is fixed or that it will be fixed in that version?
 
Wow made a tool of myself there ;) I meant in a future version!! Heheh nice speed on updates by the way :) but I am getting the same issues:

[root@www els]# ./els.sh --update
Failed loading /usr/lib/php/eaccelerator/eaccelerator.so: /usr/lib/php/eaccelerator/eaccelerator.so: cannot open shared object file: No such file or directory
Updating ELS 2.0.3.14 to 2.0.3.15...
Downloading ELS 2.0.3.15...
Done.
MD5 valid.
Extracting...
Done.

This feature can disable dangerous PHP functions.
Proceed? (y/n): y
Backing up current configuration file...
Successfully backed up as /usr/local/els/bakfiles/php.ini-disable-functions.bak!
Modifying configuration file, disable_functions found...
Edit failed!
Restoring backup...
Backup restored.
PHP is NOT disabling dangerous PHP functions.

ELS can now install eAccelerator.
Proceed? (y/n): y

Downloading eAccelerator...
Download Successful!
MD5 matches.
Extracting...
Extraction Successful!
Failed loading /usr/lib/php/eaccelerator/eaccelerator.so: /usr/lib/php/eaccelerator/eaccelerator.so: cannot open shared object file: No such file or directory
configure.in:9: warning: underquoted definition of PHP_WITH_PHP_CONFIG
run info '(automake)Extending aclocal'
or see http://sources.redhat.com/automake/automake.html#Extending-aclocal
configure.in:32: warning: underquoted definition of PHP_EXT_BUILDDIR
configure.in:33: warning: underquoted definition of PHP_EXT_DIR
configure.in:34: warning: underquoted definition of PHP_EXT_SRCDIR
configure.in:35: warning: underquoted definition of PHP_ALWAYS_SHARED
acinclude.m4:19: warning: underquoted definition of PHP_PROG_RE2C
configure.in:65: error: possibly undefined macro: AC_PROG_LIBTOOL
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
configure: error: cannot run /bin/sh ./config.sub
make: *** No targets specified and no makefile found. Stop.
mv: cannot stat `./modules/eaccelerator.so': No such file or directory

/usr/local/lib/php.ini backed up as /usr/local/els/bakfiles/php.ini-eaccelerator-install.bak.
eAccelerator installation/update complete.
Restarting Apache...
Stopping httpd: [ OK ]

Failed loading /usr/lib/php/eaccelerator/eaccelerator.so: /usr/lib/php/eaccelerator/eaccelerator.so: cannot open shared object file: No such file or directory
[ OK ]
Done.

Failed loading /usr/lib/php/eaccelerator/eaccelerator.so: /usr/lib/php/eaccelerator/eaccelerator.so: cannot open shared object file: No such file or directory
 
Last edited:
S25, I guess there are some problems with eaccelerator configure command on your server...
 
Sorry I got the command wrong. It should be chattr -i /root/.bash_profile

Thanks,
Grant

Thanks for the help.
I tried this as well and still get a no permission error. Can not edit or delete the file. I made a copy and hoped I could edit it locally, delete then reupload but no go.

I am logged in as root but it will not allow me to edit/delete or anything to the file.
 
I think what happened with my eaccalarator is that this script changed the perms on the drive, I have a sinking suspicion I cannot compile anything (which may not be such a bad thing) But that is my take on what happened.
Also please note I still cannot access phpmyadmin, How can I access it without reversing the security on /tmp.
 
Last edited:
After installing this I now see my users can not create or edit an .htaccess file. Was this the step 'chmod to root dangerous files?'

I feel like an idiot here, but anyway to reverse this? I have researched and all .htaccess info I am coming up with is not for server settings.
 
It just chmods rcp, wget, lynx, links and scp to 750. What error do you see?
 
.550 .htaccess Permission denied.

If I log as root I can edit/create .htaccess but any users are unable to.
 
Back
Top