Tag Info

New answers tagged

1

You should follow HowTo/ChangeHostname - Debian Wiki and set it to whatever you want, however it sounds like Webmin and/or Virtualmin is misbehaving (try to update it to latest version, if problem still there you might want to submit bug report).


3

First off, you mustn't use sudo in a bash script, it's non-interactive and so if you're required to use a password you won't be able to elevate. Below would be a basic example to install a single package, to install more you would add a package to the "for package in" line. The output is set to append to the existing file. #!/bin/bash apt-get update for ...


0

Well, that is one of the main reason, why debian is moving to systemd. sysvinit (/etc/init.d) is not able to detect, if a service is down/not responding. This means you have to monitor these services and escalate if a service won’t do his job anymore. probably the easiest thing to do would be to migrate to another daemonhandler like systemd (default in ...


2

You could add it to /etc/inittab with respawn: d1:2345:respawn:/path/to/your/first_daemon arg1 arg2 d2:2345:respawn:/path/to/your/second_daemon arg1 arg2 It's a dirty hack, but I've used it succesfully in the past on older sysv-init systems.


0

Debian will eventually have systemd, so this is the way to do it on a Linux system which uses systemd (and many do already; you might consider switching distributions). Systemd can handle keeping the service alive for you automatically; no other tools are required. Simply make sure that Restart=always is set in the service file's [Service] section. # vi ...


0

The standard approach for me is to use the Monit utility for this. I can't quite tell from your description if you've written something like Monit and are trying to make sure it's running, or if you need something to watch the daemon you've created.


0

Best practice is to ensure that your daemons DO NOT STOP in the first place. Failing that you might want to have a look at DJB's daemontools


0

I needed to setup 2 instances of VSFTPD. So I created a 2nd conf file /etc/vsftpd-2.conf and a 2nd init script /etc/init.d/vsftpd-2 I edited the contents of /etc/vsftpd-2.conf to include the following line listen_port=1123. I also needed to edit the /etc/init.d/vsftpd-2 file so when the start-stop-daemon is starting up the application, it uses a different ...


0

There are at least 2 ways of doing this run in standalone mode setup several different vsftpd conf files. In each set a different listen_port and call each with vsftpd /path/to/conf/file make sure to also enable standalone mode in each conf file (set listen to YES and disable vsftpd in inet/xinet) using systemd.unit to control the different ...


0

Read the manual man 5 vsftpd.conf listen_port If vsftpd is in standalone mode, this is the port it will listen on for incoming FTP connections. Default: 21


0

This is a nice little write up for getting this working on CentOS. But should work for Debian based OS's as well. https://www.centos.org/docs/5/html/5.1/Deployment_Guide/s2-ftp-vsftpd-start-multi.html If you cannot run two instances on the same server for whatever reason you could just use iptables to redirect all traffic on port 1123 to 21. iptables -t nat ...


1

Can I fix this at a system level, or is this something going wrong with each individual process? It is difficult to say because its unknown what is happening at the protocol level. Basically the read(2) will block indefinitely providing:- The TCP connection remains open. You expect at least 1 byte of data to arrive. The sender is not ready to send you ...


1

You can customise error text/documents with Apache (http://httpd.apache.org/docs/current/custom-error.html) but that wouldn't help you here. The error messages are embedded in to the client source (subversion/libsvn_ra_serf/util.c): svn_ra_serf__error_on_status(serf_status_line sline, const char *path, ...


0

Doing this manually is going to be a nightmare and definitely a case of whack-a-mole. The real question is: what kind of spam attacks? In nearly all cases these things are widespread and common enough that it can be mitigated in at least half of cases through using a public blacklist or tweaking some settings. If it's: comment spam, see if your ...


3

Reinstall the purged package (sysv-rc). If that isn't enough, try to recreate the links using insserv /etc/init.d or something similar.


0

IPtables is pretty easy. First do iptables --list to get a list of your chains and rules. The default is pretty simple. If the below doesn't work or you don't see an INPUT rule, post the output of that command with the IP's removed for security. The following adds a rule to log traffic from a server and then drop it and saves your chains so that they ...


0

Check this out for squid configuration: http://www.krizna.com/centos/how-to-install-squid-proxy-on-centos-6/


0

First and foremost, if your system is generating messages that are ending up in your queue because they are to email addresses that are not deliverable, it's FAR better to detect it during injection instead of only after attempting to deliver the email. Big email providers negatively colour your sending reputation if you are sending to too many invalid ...


0

May be you want to have a simple bash script or your prefered shell script. #!/bin/bash shit="/tmp/null_ips" ips=$(grep -Ev "^#" $shit) for ip in $ips do ip route add blackhole $ip done further: Check if you already blocked those ip.. ip route show


1

Is there a reason you want to null route the hosts vs. just blocking them with IP tables? Either way both IPtables rules and static routes can be managed via set config files in ubuntu. You could write a script to parse a text file and then modify the route or iptables config files, but that seems circular. It would essentially be creating a config file ...


1

So in looking at your logs we can pretty clearly see that your system is attempting to use an IPv6 address for mail.google.com (DIRECT/2607:f8b0:4004:803::1015). This would happen if you have an IPv6 somewhat configured on your system. But I suspect you don't have it completely configured, or perhaps your ISP doesn't have IPv6 fully configured. The point ...


0

Don't know if the same than which happens with Cyrus IMAPd can happen with Dovecot. Let's try. The Linux kernel gathers real randomness, entropy, from multiple sources and events. This data can be read by any program from /dev/random. Well, sometimes if there's not enough 'real' randomness generated (for example, the server does not contain a hardware ...


1

Option one: You did not set the softlimit higher aswell. Possible solution: in /etc/security/limits.conf add * soft nofile 2048 test with ulimit -n 2048 Option two: You are logged in as user and in some "config" file (profile, bashrc, something like this) the soft limit is set to a lower value. Possible solution f.e. grep for ulimit in your etc ...


0

I've figured it out. I was having problems with my symbolic links... thanks for your help. For those of you experiencing similar issues, make sure your simbolic link in /etc/nginx/sites-enabled/ is pointing to the right file in /etc/nginx/sites-available/


0

I had a similar issue with response time, until I found out that the SpamAssassin database requires some minimal ongoing maintenance. Are you issuing sa-learn --force-expire on a daily basis? It could be that a lack of maintenance has made the database unweildy and it needs to be "trimmed up a bit". Try placing it in a daily cron job and see if the ...


0

Create the run files in /etc/sv/pants/ not /etc/service/pants/. Then a symlink should be created in /etc/service to /etc/sv/pants to activate the service. ln -s /etc/sv/pants /etc/service/ While creating the files directly in /etc/service works for just the service, it seems to cause problems when using logging as well. A service can be deactivated by ...


1

Check to see if your network interface is up. With a binding error like that you have two major options: Something is already listening on that port. (Not the case for you) You don't have the declared IP address available. (In your case I don't think 127.0.0.1 is up)


2

Besides as primary mx, Postfix can be used as backup mx too. It has documentation how to setup one in Configuring Postfix as primary or backup MX host for a remote site. Basically you have two file with the content (1) list of valid domain (e.g. domain of primary mx) and (2) list of valid user (e.g. email address handled by primary mx). For example we save ...


2

SpamAssassin comes with sa-learn out of the box (not to be confused with the sa-learn-cyrus you mentioned). It comes with two learning modes, ham and spam. It would take a very, very simple script to walk through each user's mailbox, doing a "ham" pass at first, and a second walk-through for "spam". Something (roughly) like: #!/bin/bash # change these ...


0

Wordpress Was The Problem Or rather, me not knowing that I had to configure the Wordpress site url to be the subdomain, otherwise it would just redirect to the domain given... So the solution: open the wp_options table and edit the site_url to include the subdomain.


1

Using postfix you can do as follow in your postfix main.cf: 1: go to your MX backup server and add permit_mx_backup to your smtpd_recipient_restrictions 2: always in your MX backup server relay_domains = $mydestination domain1.com domain2.net domain3.org If you want you use file for specified the domains you can do touch /etc/postfix/domains echo ...


1

I wrote my own script using doveadm search to read training mails from certain IMAP folders in my own account. The usual disclaimers apply, it is not pretty but works for me. You will also have to remove the crm114 mailtrainer.crm call at the end. Edit: I realized my script also uses crm114 feature (a cache dir of all processed messages in ...


1

Try this: P="/var/lib/reoback/backups/2014-06-30/var/lib/mysql" chown -R mysql:mysql $P # mysqld v5.0 mysqld --port=3399 --socket=$P/mysqld.sock --datadir=$P \ --pid-file=$P/mysqld.pid \ --log-error=$P/error.log If it does't start, check $P/error.log why


1

Yes I would say you need a second socket. You can create one it using mkfifo - but maybe MySQL should recreate it on its own.


3

You have at least two obvious problems here. First, you didn't define a root in your server block. You instead misplaced it in one of the location blocks. This is one of the most common nginx misconfigurations. Second, you have a typo in one of your try_files statements. = 404 should be =404.


0

ProliantSupportPack is obsolete at least for Debian. HP drivers should be in stock kernel, utilities can be downloaded from "Management Component Pack". To use it, add this list to your /etc/apt/sources.list: deb http://downloads.linux.hp.com/SDR/downloads/ManagementComponentPack/debian/ wheezy/current non-free However on my G7 server with SmartArray ...


0

This behaviour is likely due to the fact that more_set_input_headers handler is executed before access phase (where auth_request works), and hence only changes a request if it's internally redirected. Solution to the problem is to stop using more_set_input_headers (it's anyway very wrong, request headers shouldn't be changed) and use native ...


1

Dennis pointed me in the right direction. In the comments I can't clearly show what worked out for me, so I'll answer my question based on his input. Backup & edit /etc/fstab. Added: tmpfs /path/to/mount/point tmpfs rw 0 0 Backup & edit /etc/init.d/mysql. I have put my code at the beginning of sanity checks, before [start|stop] cases: ...


1

Make sure you enable your site with a2ensite dev.mysite.com Once you do this, a symlink to the config file is placed in the sites-enabled directory, which should allow the site to be accessed assuming no other issues exist. This question gives a few more details.


0

You could use a service script yourself (good) or include it in the mysql script (temp. workarround, ugly, wont work after updates.) something like /etc/init.d/mysql should exist. then you would search for start and before mysql is actually started you would add your part of the script. (might differ a bit with newer versions though) on one of my hosts ...


0

It seems to work if also the physical interface is set to auto: auto eth0 auto eth0.2 auto myprovider iface eth0 inet manual iface eth0.2 inet manual iface myprovider inet ppp pre-up /sbin/ifconfig eth0.2 up provider myprovider


2

It's possible that even with a restart that something is creating and holding the files. Do a lsof | grep deleted or something to that effect to view the (deleted) files. Also, a great program to track disk usage is ncdu. With ncdu -x . you won't miss any files and it won't traverse the partitions.


2

You are missing some configuration in your virtual host settings. As explained in Apache docs you need to specify following options for your named virtual host: ServerName www.domain.tld ServerAlias domain.tld *.domain.tld DocumentRoot /www/domain ServerAlias is optional, but usually you will want to use it. In your case you need to specify: ServerName ...


0

Another solution if all your hosts are running Debian (or derivatives) is to use the cron-apt package. But, as suggested per the documentation, a bit of care must be taken. I'm currently using cron-apt on a dozen of servers to perform all the security updates automatically and unattended. To avoid any unwanted upgrades, I only use cron-apt on servers ...


1

you can use Fabric. Fabric is a Python (2.5-2.7) library and command-line tool for streamlining the use of SSH for application deployment or systems administration tasks.


0

Check your access logs around the time, maybe you can find something there.


1

You could just add a sock file to the command line: /usr/local/bin/uwsgi --virtualenv $ENV --module project --chdir $APP --master -s myapp.sock


2

This is now possible via the "install_options" setting in the Puppet 'package' type: http://docs.puppetlabs.com/references/latest/type.html#package-attribute-install_options For example: package { 'nmap': ensure => installed, install_options => ['--no-install-recommends'], } The above ensures the "--no-install-recommends" option is ...


0

You just put $ at the end of the RewriteRule, but you'll want the first capture group of your regex (the .* bit of ^(.*)$). That is fetched with $1, also mind you'll still need a trailing slash at the end. So, all in all, update your rule to: RewriteRule ^(.*)$ http://www.example.net/subdirectory/$1 [L,R=301] http://www.example.com/link.php?a=1&b=1 ...


0

There should be no need to specify the SCRIPT_FILENAME separately in the PHP location block. It is already defined in /etc/nginx/fastcgi_params file. So, remove the fastcgi_param SCRIPT_FILENAME line. Also, for PHP script security, I would add: fastcgi_split_path_info ^(.+\.php)(/.+)$; to the PHP location block. Otherwise, are you sure you have the ...



Top 50 recent answers are included