Questions tagged [unix]
Unix is a multitasking, multi-user computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs.
1,963 questions
0
votes
0
answers
131
views
Setting up IBM HTTP server audit_log rotate
I found somewhere online that you can set up log rotation for audit_log on httpserver so in my modsecurity.conf i switched logging conf from:
SecAuditLog logs/audit_log
to
SecAuditLog "|/usr/IBM/...
0
votes
0
answers
22
views
Convertingt top custom command for memory usage by processes to AIX
I wrote a custom shell command using the top command, in order of getting the sum memory usage for all the processes of a given program (for example java*, mongodb*, etc..) in a Linux based servers:
...
0
votes
1
answer
101
views
How to delete non root-owned files from Unix /tmp folder
We have some Ubuntu v22 servers that get a lot of files dumped into the /tmp directory, in spite of our best code efforts to clean up after the processes are done. What we would like to do is run a ...
1
vote
1
answer
340
views
How to Dynamically Adjust Rate Limits Based on Concurrent Connections in Nginx?
I am currently facing a challenge with dynamically adjusting rate limits in my Nginx configuration based on the number of concurrent connections to my web server.
Problem Statement:
I have set up a ...
0
votes
1
answer
75
views
Is my dedicated server HD dying?
I have a dedicated server with 2 3TB SATA HDs. I use the server to create and share torrents. Recently I got the following error message when trying to create a torrent based on files on that server.
...
0
votes
0
answers
78
views
what should unix dev_weight value be set to?
This past week, I was looking for a way to boost server performance despite it having multiple CPUs at 3.3Ghz each.
So I thought, let's increase dev_weight to 512 because documentation states the ...
0
votes
0
answers
133
views
Linux ACL of a shared folder for specific group
I need to make a shared folder: I have separated my work between several users on the same computer and need them to access the same folder without restriction. They all belong to a "work" ...
1
vote
0
answers
1k
views
Kubernetes- execution phase preflight: couldn't validate the identity of the API Server
I am trying to create a bare metal Kubernetes cluster of one master node and three worker nodes. The nodes are Ubuntu VMs running in a VMWare Workstation lab environment. The master node is ...
1
vote
1
answer
206
views
FreeBSD user has no permission on .ssh directory
I have a problem on FreeBSD 14.0 - the ~/.ssh/ directory is owned by me, but I can not access it as myself:
$ ls -al .ssh
ls: .: Permission denied
ls: ..: Permission denied
ls: authorized_keys: ...
0
votes
1
answer
77
views
argument to pgrep from cmdline returns 2 PID's and argument from global variable value returns 1 PID
1.first case(processName as argument from cmd i.e java)
command from cmd with arguments : ./a.sh getProcessId contains java
code:
getProcessId(){
matchType=$1
#defaulting matchArg to x i.e exact ...
0
votes
1
answer
382
views
pgrep -f from shell script is returning 2 pid instead of 1
code :
function main {
[ -z "$@" ] && { getProcessId "$@" } || "$@"
}
getProcessId(){
matchType=$1
#defaulting matchArg to x i.e exact match
matchArg=x
...
0
votes
2
answers
395
views
change shell to /usr/bin/false in IBM aix os
I would define the program run for the user at session initiation into /usr/bin/false in /etc/passwd. The default value parameter is /usr/bin/ksh.
When I try to modify it with commands:
bash-5.1# ...
0
votes
1
answer
702
views
kubectl get nodes --kubeconfig admin.kubeconfig returns "No resources found"
I am a newbie in Kubernetes. I am not even very familiar with basic kubernetes commands, but the installation is a starting point for my learning journey. I wanted to avoid installing something like ...
-2
votes
1
answer
67
views
Is it bad that I don't update the server? [closed]
I am running an application on my server with the help of Nodejs, and it has many dependencies such as Chrome.
I have not updated my server for two years. I am afraid that if I do, my code will fail ...
0
votes
0
answers
29
views
Need help in logrotation
I have custom logrotation as below..
cat /etc/logrotate.d/apache
#
#
/var/log/apache/apache.log
{
daily
rotate 30
size 1G
compress
missingok
...
1
vote
1
answer
389
views
nginx fowarding 20% (spaces) instead of + in url
I have an NGINX config that takes url's converts them with regular expression, this works fine. The issue is that while forwarding to the new atlassian instance the + from the URL is turned into %20 ...
0
votes
1
answer
748
views
is /etc/sudoers writable or not
The default permission in /etc/sudoers file is readonly for root and group root as in picture is obvious :
So when you open it with any test editor it can't be written and give error read only.
now ...
1
vote
0
answers
295
views
Mount a remote GPU locally on Rocky Linux
I am doing some work on a server which has 1TB RAM, 100CPUs, and 1000TB storage. My work involves very large datasets.
One specific I am trying to run would benefit immensely from a GPU, it is ML ...
1
vote
3
answers
1k
views
How to have an environment variable with quotes in crontab?
I have a minimum example of my problem, which is trying to install a crontab that looks like this:
FOO="foo\"bar\"bin"
0 0 1 * * ls
by running crontab crontab (I have it in a ...
0
votes
1
answer
418
views
Passing a user input to an ssh command
I'm currently trying to create a shell script that will execute a mysqldump on a remote mysql database and then copy the output file back to my local machine. The problem I'm running into is that I ...
0
votes
0
answers
187
views
Apache 2.4 unixgroup authentication not working
Require unix-group is not working for me when configuring the VirtualHost for my Apache server. Whenever I log in using pwauth, the server still authenticates users who are not members of the group ...
0
votes
1
answer
3k
views
Send STDERR to console and file, STDOUT to file only
I have some script with STDOUT and STDERR output. By default, both STDOUT and STDERR goes to console:
./script.sh
I can redirect STDOUT to file, leaving STDERR output in console:
./script.sh > log....
0
votes
0
answers
166
views
How to Find which Program is generating given .dat File
I have a file in a folder on the server with ".dat" extension. I want to find which program file is generating this file.
How should I find this using putty?
0
votes
0
answers
105
views
Linux Debian ACL, is default mask overriden by something in FTP?
I have an Linux Debain 10 server running an web project.
The project (parent) folder is as follows:
ls -la:
drwxrwxr--+ 7 some_user some_group 4096 Jul 21 11:01 .
getfacl:
# file: .
# owner: ...
0
votes
1
answer
558
views
sed not working on large files. Any other options available?
Trying to insert a line feed on large files in UNIX when a text string matches. Any file around 1GB or less, it works. Anything over that size, it does not complete the replace. It appears to do ...
0
votes
0
answers
204
views
Add mac address in rsyslog template
I am trying to add system/device mac address in syslog. No solution is working for me. Following command gives me mac address, just wanted to use in rsyslog template.
mac_addr=$(ifconfig en0 | awk '/...
0
votes
0
answers
2k
views
Can't enable the PHP DOM extension
I have a server that has PHP 7.4.3 installed, but it doesn't load PHP-DOM.
It's not listed in php -m or php -i, nor when I load PHP on a page.
Here's what I tried so far:
Ran sudo apt-get install php-...
0
votes
1
answer
50
views
How to protect Jenkins from super users?
Any super user who has access to the Jenkins running on a Linux server can easily disable security authentication from config.xml file; then log in and can also decrypt sensitive passwords from ...
1
vote
1
answer
872
views
'mail' not working in Script same way it is working from command line
The below line of code/command is working as expected if I run it from Unix terminal, but not if I include it in a script and run the script - exact same.
I am expecting the X-Priority to show the ...
0
votes
2
answers
694
views
Adding users to Unix groups only if said groups exist (puppet)
I tried using the 'group' attribute of the 'user' resource like so :
user {
"user":
group => ["docker", "www-data"]
}
If the groups 'docker' and 'www-data' exist ...
-2
votes
1
answer
194
views
transfer file from Unix to a writeable Windows share, if I don't have direct login rights to the latter
I'm an sa on Unix side, and there is a writeable Windows share, which I can access from my desktop using an AD service account.
How can I batch a file transfer from Unix over to that mount (it's not ...
0
votes
1
answer
188
views
Way to know the current shell in a given terminal
I have a shell on a Unix system.
Is there a command that can tell me which shell I am working ? (bash, zsh, etc. )
-1
votes
1
answer
119
views
Linux analyze and monitoring log tool?
I have a server using OS centos-7, but sometimes my server got slow with some processes. I want to check which service or process makes the system slow. how to check the percentage of CPU, ram, or ...
0
votes
0
answers
340
views
Failed to connect to remote MySQL server via proxy
I am trying to use an R tool in which RMySQL is one of the package being used. I am working this on ubuntu behind a corporate proxy but having the following issue for three days persistently.
Error ...
2
votes
1
answer
2k
views
Does information piped through a Unix socket touch disk?
I'm trying to understand how fast different IPC mechanisms are, and I know it's possible to create a Unix Socket as a "file" in a directory on a filesystem, but what I don't understand is ...
2
votes
0
answers
476
views
Is there a utility for detecting temporary system freezes?
Is there a (unix) utility which is able to detect temporary system freezes by observation?
E.g. I could imagine an utility which continuously fetches the system time, sleeps for a specific amount of ...
0
votes
1
answer
40
views
Single SSH login for multilpe machines?
I have a number of physical (desktop) machines running at the office as part of a new network to handle processing & serving Open Source data; some of these machines also house VMs.
At the moment, ...
0
votes
1
answer
298
views
Geting UNIX Timestamp while logging history
I am running below bash script which is saving the history in a file, however it is logging the history with Unix epoch timestamp. I need the timestamp in human readable format.
_who_am_i=$(who am i|...
1
vote
1
answer
2k
views
Why some companies like cisco follow different syslog messaging format rather than rfc 3164 (BSD syslog) and rfc 5424 (IETF syslog)?
According to my understanding the popular syslog formats are:
RFC 3124 (BSD syslog):
Format: < priority >timestamp hostname application: message
Example: <133>Feb 25 14:09:07 webserver ...
-2
votes
1
answer
484
views
Why an operating system would like to be POSIX compliant? [closed]
What's the big deal around POSIX and how it interferes in the overall usage of an Operating System?
0
votes
1
answer
533
views
Nginx reverse proxy when port is already in use?
i am trying to close port with basic authentication (for pushgateway of prometheus), so not a big specialist in nginx, so could someone please give me and advice where i am is wrong?
I have 9091 port, ...
0
votes
2
answers
184
views
Issue using dd to write 1GB file to zfs dataset on FreeBSD 13
Hey guys I am turning up a little FAMP stack on an Azure VM. 4 Xeon cores 16GB ram. Second SSD is using ZFS and the boot drive is UFS2 (Default). When I dd if=/dev/zero of=testfile bs=1024 count=...
1
vote
0
answers
1k
views
Replace a string from the cat output
I need to replace a string with the string which is mentioned in a file abcd.txt in all files in a folder.
For eg: I want to replace a string 'apple' with whatever the cat output of this file abcd.txt
...
1
vote
0
answers
927
views
Copying files from remote to local using lftp in unix
I'm trying to write a script to copy some files from a remote ftp server to a local directory. I have seen lots of examples using the mirror command of lftp but so far none of them seem to work. ...
0
votes
0
answers
174
views
NextCloud : Can you use encrypted drives / file level encryption?
I am evaluating NextCloud for a solution for which I have a requirement that files cannot exist on non encrypted disks or the files themselves cannot be individually read or cached.
I have read a lot ...
0
votes
1
answer
549
views
What is the maximum value acceptable for xargs -P argument? [duplicate]
In this answer they mention 10
I did man xargs and couldn't find what's the maximum limit.
Is it possible to send 10000 cURL requests per second?
How about 50000 cURL requests per second? I mean all ...
0
votes
1
answer
366
views
What was linux/unix time standard before inventing epoch? [closed]
As in the title, I was looking for, but hadn't found. How were time stored and processed before epoch standardizing in 2000?
0
votes
2
answers
2k
views
How to edit the middle of host name (%h) in ssh config?
In ssh config you can easily edit a hostname by appending or prepending it with something. For example, when you want to connect to server with ssh test5, but actually the server name is test5.mail, ...
0
votes
0
answers
706
views
change fastcgi directory in nginx configuration
i am not sure how to write the proper title
i have 5 ajax requests that gonna execute postgresql query in php
here is the directory
/var/www/webgis.com:
1. webgis.html
2. php(directory)
-query1....
0
votes
1
answer
418
views
finding docker images with tag and name
when I do docker images I have below docker images as list where there are images with multiple tag and also image with latest tag value.
REPOSITORY TAG ...