New answers tagged

1

Logs should be write-only if they contain potentially confidential data. Obviously they can only be write-only to the application that produces the log and other applications running on the server, and perhaps even to the logging subsystem (once written to the log files), but system administrators and auditors should be able to read them. The most important ...


3

The www-data user is evidently configured with /sbin/nologin (or equivalent) as its shell, and thus the system will not allow you to login to that account. sudo lets you run a command as any user on the system, not just root. To clone the repo, you just need to sudo -u www-data git clone ... If you really need shell access as that user, sudo -u www-data ...


0

You'll need a root access anyway to install and configure any software on your server. After that you can work as regular user and access your files. Take a look here for example of installing and configuring LAMP on CentOS server.


0

If you have another server somewhere you can run SSH tunnel to connect to it, or configure OpenVPN client on your RPi device to connect to it. SSH tunnel can help you but it will be hard to maintain if connection lost due internet fails or something else. OpenVPN looks more stable in my book.


0

Besides using netstat, you can also use lsof to list open files (streams, sockets, block files etc.). root@host: lsof -i -n -P |grep httpd COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME httpd 4291 root 3u IPv4 124715 0t0 TCP *:80 (LISTEN) lsof (8) - list open files -i = show IPv4/6 files -n = do not ...


0

Being root you can run netstat -ntlp | grep httpd [root@cluster ~]# netstat -ntlp|grep httpd tcp6 0 0 :::80 :::* LISTEN 13876/httpd tcp6 0 0 :::443 :::* LISTEN 13876/httpd :::80 and :::443 are the listening port. 13876 is the process id.


0

nmap localhost cat httpd.conf | grep port


1

This is filthy, but simple : $ awk '{print $8}' < request_log | sort -u | wc -l To do the last 5 minutes bit, try: $ grep -A 9999999 'five minutes ago string' awk '{print $8}' < request_log | sort -u | wc -l obviously $8 is the position of the client ip in each line of your log. There are lots of log analyzers, many of which are free. Don't pay for ...


1

Most web statistics tools summarise the log over a period of 24 hours or a month. The simplest cli ncurses-based one is goaccess. For an instant view of your apache server current cpu usage and threads there is server-status which you could retrieve via curl, in html. See a live demo (beware large file). Nginx has a similar feature. You might also look ...


3

From your output, it's a redhat based system. Your kernel has el6 in the name and gcc states Red Hat 4.4.7-16. This more than likely means it's CentOS 6. Typically on Red Hat systems, these will give you a hint on what's installed: /etc/redhat-release /etc/centos-release uname -r => If the kernel has an EL* in the name, it's Enterprise Linux. The number ...


0

I think you have to chop off timestamp to get unique error grep 'error message' /logfiles | cut -d' ' -f6- | sort | uniq -c | sort -nr


0

I like NAT. It sort off keeps the internet outside our private internet while still letting you access all the (public) internet. So security wise a nice thing, so to speak. In your case though, a nightmare. That's why NAT doesn't exist in IPv6. So first suggestion, can you get it to work with IPv6? Second suggestion, call T-Mobile and complain. Tell them ...



Top 50 recent answers are included