Debian is a popular and influential GNU/Linux distribution. Questions here should generally be about Debian Server.

learn more… | top users | synonyms

134
votes
3answers
86k views

What's the best way of handling permissions for apache2's user www-data in /var/www?

Has anyone got a nice solution for handling files in /var/www? We're running Name Based Virtual Hosts and the apache2 user is www-data. We've got two regular users & root. So when messing with ...
3
votes
1answer
897 views

Prevent mail being marked as spam

This is a canonical question about avoiding outgoing mail being classified as spam. I'm wondering how to prevent my emails from my site being marked as spam? I'm using sendmail. I'm trying to ...
18
votes
5answers
11k views

How can I chroot ssh connections?

I would like to setup a chroot jail for most (not all) users logging in though SSH. I've heard it's possible with the latest versions of openssh, but I've not been able to find out how to do it. The ...
50
votes
5answers
3k views

How should an IT department choose a Linux distribution: Technical reasons

There is a lot of community feeling about what Linux distributions are appropriate for production server environments and what aren't. Some of this is based on the availability of commercial support. ...
3
votes
4answers
579 views

ssh delay when connecting

When connecting to one specific server (running Debian Lenny) it always takes about 5 seconds before it prompts me to enter a password. After login there is no noticable delay anymore. There is also ...
11
votes
5answers
51k views

Huge amount of TIME_WAIT connections says netstat

Okay, this is creeping me out - I see about 1500-2500 of these: root@wherever:# netstat Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 ...
57
votes
13answers
27k views

What steps do you take to secure a Debian server?

I am installing a Debian server which is connected directly to the Internet. Obviously I want to make it as secure as possible. I would like you guys/gals to add your ideas to secure it and what ...
22
votes
7answers
20k views

how can I limit per user bandwidth?

To summarise: I have a dedicated server with a few friends running a torrent client with web gui. Each user is running a client under their username on the server so downloads go in their user dir, ...
8
votes
2answers
9k views

Running out of memory running fsck on large filesystems

I look after an old Debian linux box (running etch) with only 512 MB of RAM, but a lot of external storage attached. One ext3 filesystem is 2.7 TB in size, and fsck can't check it, because it runs ...
1
vote
1answer
538 views

How to create a bootable redundant Debian system with a 3 or 4 (or more) disk software raid10?

How do I create a Debian system which is bootable, has a software raid10 and will still boot when I take out one or more (bootable) disks? I would like to use as few disks as possible, preferably 3 or ...
40
votes
12answers
25k views

How much SWAP space on a high memory system?

How should I decide what size to make my swap size on a new linux machine (Debian) with a reasonably large amount of Ram (2-4 GB)? Do I really need swap space defined?
9
votes
7answers
8k views

Best way to do Subversion backups?

What is the best way to do Subversion backups (on a Debian based server). Is it to use svnadmin? svnadmin dump /path/to/reponame > reponame.dump Or maybe just to tar the dir where the ...
22
votes
2answers
10k views

Can someone clarify Ubuntu (Debian) dist-upgrade for me?

I've got an Ubuntu 8.04 LTS server. There are several packages which are "kept back" ("the following updates have been kept back:") when I do an apt-get upgrade. It's my understanding that I can do ...
23
votes
9answers
36k views

How do I get apt-get to ignore some dependencies?

How do I make apt-get ignore some dependencies? For example, I wanted to install mailx so I can use it to send email from cron scripts/report-generating tools. However, installing mailx also installs ...
9
votes
6answers
4k views

How can I log users' bash commands?

I'm running a debian etch server where users will be logging into (hopefully) a chroot jail through ssh. How can I have the commands they execute logged in a way they cannot delete, nor prevent?
8
votes
7answers
1k views

Disable prompts while installing a Debian package

How can i disable totally the prompts that appear while installing a Debian package, i've used all the options that i've found but there are some packages that are still prompting. I'm using this ...
21
votes
4answers
12k views

automate dpkg-reconfigure tzdata

I'm using puppet to admin a cluster of debian servers. I need to change the timezone of each machine on the cluster. The proper debian way to do this is to use dpkg-reconfigure tzdata .. but I can ...
13
votes
2answers
2k views

What is the difference between sudo -i and sudo su -

What is the difference between commands sudo -i and sudo su -? Are they the same?
9
votes
3answers
4k views

High load average, low cpu

My server has slowed down, and I don't know why. Print from top: top - 14:32:50 up 639 days, 6:30, 1 user, load average: 67.93, 70.63, 79.85 Tasks: 245 total, 1 running, 244 sleeping, 0 ...
11
votes
5answers
15k views

How do I change Exim4's primary_hostname on a Debian box?

Some remote SMTP server I am trying to deliver mail to refuses to accept the HELO from my server: 504 5.5.2 <localhost>: Helo command rejected: need fully-qualified hostname Apparently, my ...
3
votes
2answers
1k views

Debian 'ignores' /etc/network/if-pre-up.d/iptables

I want my iptables rules to automatically be loaded on startup. According to the wiki on Debian this can be done by placing a script with the name iptables in /etc/network/if-pre-up.d/ So I did, this ...
43
votes
9answers
50k views

How can I export the privileges from MySQL and then import to a new server?

I know how to export/import the databases using mysqldump & that's fine but how do I get the privileges into the new server. For extra points, there are a couple of existing databases on the new ...
19
votes
8answers
5k views

automated linux deployment and config management at small scale - is it worth it?

i'm about to deploy ~25 servers running debian. machines will have different roles - web servers, java appservs, proxies, mysql boxes. environment will probably not grow much in the future - maybe 2-5 ...
10
votes
7answers
2k views

How can I delete all files from a directory when it reports “Argument list too long”

I have a directory with a couple hundred thousand files in it. I want to delete all the files, but rm * -f reports: "argument list too long" What is the best way to clear out this directory?
7
votes
7answers
3k views

How to perform cron jobs failover?

Using two Debian servers, I need to setup a strong failover environment for cron jobs that can be only called on one server at a time. Moving a file in /etc/cron.d should do the trick, but is there ...
12
votes
6answers
34k views

Run a shell script as a different user

What's a good way of running a shell script as a different user. I'm using Debian etch, and I know which user I want to impersonate. If I was doing it manually, I would do: su postgres ...
6
votes
7answers
996 views

What are the most essential tools for Linux security? [closed]

I'm running a hobby Debian sever hosting a few web sites, software repositories, and some other apps. There are tons of all kinds of network security enhancement tools available. Firewalls, hardening ...
5
votes
1answer
5k views

debconf: DbDriver “config”: /var/cache/debconf/config.dat is locked by another process

I ran apt-get upgrade on my debian/testing system and now I get the error above. How can I fix this? shell transcript follows: 136 upgraded, 0 newly installed, 0 to remove and 40 not upgraded. 1 not ...
5
votes
6answers
3k views

In Linux/Debian, did the passwords (/etc/passwd) ever been stored as plain text?

Someone is telling me so and I have some doubt but I can't find any information on the web.
5
votes
2answers
6k views

How to completely remove a package in Debian?

I tried to use this: aptitude remove denyhosts And it seemed successfully but after a reboot after I use: ps aux | grep "denyhosts" I see denyhosts is still loaded after startup. So what am I ...
4
votes
8answers
1k views

debian mysql auto daily backuping

I need to backup my Mysql database daily under a Debian server. I know there are plenty of scripts out there but my need is backing up daily as a sql file and putting each backup seperately(maybe the ...
4
votes
5answers
7k views

iptables port forwarding on debian

I'm trying to setup a simple port forwarding firewall and I can't make the basic non-firewall configuration to work. I have setup the iptables script as follows #!/bin/sh # interfaces LAN="eth1" ...
3
votes
1answer
357 views

How should I create a local fork of a debian package?

I wish to maintain a local fork of a debian package. I need to patch a bug which will eventually be fixed in the official package, but not for some time. How do I create a .deb package, and how do I ...
3
votes
4answers
703 views

How do you handle updates on a server?

I am really lazy I will give you guys this ;) but I have ~25 virtual machines running on xen. I really like xen and everything but now comes the tricky part.. I don't really feel like going through 25 ...
2
votes
4answers
5k views

Why does the $PATH of an ssh remote command differ from that of an interactive shell?

I have a user that has made no modifications to the $PATH in any dot-files: it is exactly the system default setting. From a login shell: $ ssh example.com user@example.com:~$ cat /tmp/hello.hs ...
2
votes
3answers
812 views

Am I getting DDoSed, and what should I about it?

At the moment my server is lagging pretty bad, and it crashes. It's a dedicated server which has run completely fine last two days. What does this command do? netstat -n|grep :80|cut -c 45-|cut -f 1 ...
1
vote
2answers
764 views

executing a sh script from the cron

I have a test.sh script #!/bin/sh php /home/v/file.php sh /root/x/some.sh when I execute the file as root from command line it works. sh /home/v/test.sh when I set it to crontab -e (is the root ...
0
votes
1answer
9k views

Server not responding to SSH and HTTP but ping works

I requested an hard reboot because none of ssh and http worked. Ping worked normally. Which logs should i check to understand what was the problem? Thanks! (debian 6 on lamp) Edit: my memory and ...
6
votes
4answers
399 views

How to know what user belongs to what ip on debian

is there a way to get an overview of users logged in on my server and the ip they are connecting from ? I have the IP already, I want the user that is associated with it :)
5
votes
5answers
6k views

Debian Squeeze Hyper-V Drivers

I have a fresh Debian 6.0.0 (Squeeze) server running on Hyper-V and I'm trying to get the synthetic drivers loaded into the kernel (2.6.32-5-amd64). The research I've done says that the Linux ...
2
votes
1answer
269 views

Recover ext3 files from hard disk with bad sector

I have a folder of about 5GB that suddenly disappeared. When I checked its hard disk, I found out it has bad sector for about 2-3MB on this folder. Maybe it is on the folder's pointer. The partition ...
2
votes
2answers
2k views

OpenVPN bad source address from client

I have one problem with OpenVPN. There are a lot drops records in the openvpn log file on the server: Mon Oct 22 10:14:41 2012 us=726541 laptop/ххх:1194 MULTI: bad source address from client ...
2
votes
1answer
1k views

How do I redirect one port to another on a local computer using iptables?

All of the port forwarding examples I can find are for NAT, which is not what I want. We have an HTTP server application that only binds to 1 port at a time. However, we need to bind to an additional ...
2
votes
3answers
2k views

Millions of files in php's tmp error - how to delete?

I've got a tmp-folder with 14 million php session files in my home directory. At least that's what I think it is, it's not like I could ls it or anything. I've tried using find with the -exec rm {} ...
2
votes
1answer
480 views

Multicast routing

I got two firewalls running Keepalived and working ok. I would like to pass the vrrp multicast traffic bethween a direct back to back link between those firewalls (that direct link is already used by ...
2
votes
0answers
3k views

Getting PHP mail() function to work on Debian Lenny [closed]

I'm trying to setup a Debian Lenny box to be used for web development. It's running the standard PHP5, Apache2, and MySQL5. I've been trying to get it so that I can use the PHP mail() function to send ...
1
vote
1answer
338 views

startpar process left hanging when starting processes from rc.local or init.d

I have a peculiar issue when starting ongoing(service-like) processes from either full blown init.d script (SysV style) or a simple one-line call from rc.local file like so: su someuser -c ...
1
vote
1answer
229 views

Are these malicious requests in my apache access log?

So I noticed that my apache access log is filled with these : 180.179.206.84 - - [06/Feb/2013:14:35:45 -0500] "GET ...
1
vote
1answer
292 views

Help! Apache/PHP upgrade has uninstalled my Plesk 9 on Debian

Please help! I have launched apt-get to update my apache2 installation and to upgrade from php4 to php5, apache2 and php5 were installed but my plesk 9 installation were disappeared! I already have ...
1
vote
3answers
1k views

How to make an ISO copy of Linux-filesystem and user files of VPS Debian based?

I have a Debian-Based VPS on some hosting. I want to migrate from it and i need to make a full copy of all Linux-filesystem (and installed packages) + all home directory with website files. And then ...