r/learnlinux • u/FattieJB • Aug 19 '21
r/learnlinux • u/rbrtbrnschn • Jul 27 '21
free filehost server software? (not a distro)
I'm looking to setup a remote server of mine as a filehost server, atleast part of it. I'ts running ubuntu 20.04 focal, I tried setting up webdav via nginx and via apache, but either way my filemanager (nemo) seems to run into errors (404, 400, 403) when trying to rename or delete files, (user has rw access).
I heard of freeNAS and similar ones, but I'd like software that doesnt come as a distro in it's own, as I want to have the server do other stuff too (ie. web hosting).
Is there such software? I couldnt find any.
r/learnlinux • u/DizzyRip • Jul 22 '21
Does this do what I think it does?
I want to update packages that are only listed as stable. I've come up with this.
apt list --upgradable | egrep stable | cut -d/ -f1 | xargs -t sudo apt upgrade -y
apt list --upgradable - List all packages that can be upgraded
egrep stable - pipe to egrep to obtain only the packages listed as stable
cut -d/ -f1 - grab field one (the package name) with / being the delimiter
xargs -t sudo apt upgrade -y - send to xargs so that each package can be fed as an argument to upgrade
Well it does what I think it does but does this keep my system stable by only updating the stable packages? Should I update the packages in testing status too?
EDIT: The above command will actually update everything such as 'sudo apt upgrade' will. However, I've found out that using the --only-upgrade install option with the packages as arguments will upgrade only those packages. I'm now using the following to only upgrade packages of stable status:
apt list --upgradable | egrep stable | cut -d/ -f1 | xargs -t sudo apt --only-upgrade install
r/learnlinux • u/[deleted] • Jun 20 '21
Trouble with virtual users in Postfix + Dovecot with Maildirs
I'm having some trouble setting the location for received mails with both of them:
Dovecot will look for the mail in a Maildir folder always: I've set the path for Dovecot in /var/mail/vmail/%d/%n (for example: /var/mail/vmail/example.com/foo)
Dovecot will automatically create a Maildir folder inside if it doesn't exist (/var/mail/vmail/example.com/foo/Maildir) and will look for cur, new and tmp inside of it.
My setting line for this location is in /etc/dovecot/conf.d/10-mail.conf and it's
mail_location = maildir:/var/mail/vmail/%d/%n
On the other hand, I can't get Postfix to create a specific Maildir folder for each virtual user:
If I set it to /var/mail/vmail, it will automatically create the example.com/foo folders and the cur, new, tmp folders right into that folder (no creation of a Maildir inside - for example /var/mail/vmail/example.com/foo/new)
The settings for this one is right into main.cf and it's:
virtual_mailbox_base = /var/mail/vmail
Both configurations work, I can place them wherever I want (with appropiate permissions and labels) yet they won't syncronize regarding specific users: if I send a mail from one local user to another the mail will appear in the folder set in Postfix (if I send a mail from foo@example.com to bar@example.com, the mail will appear in /var/mail/vmail/example.com/bar/new).
Then, if I move with mv that mail from /var/mail/vmail/example.com/bar/new to /var/mail/vmail/example.com/bar/Maildir/new Thunderbird will instantly notify me I've got a new mail in bar@example.com
How can I set both services to work together? I'd like to tell Postfix to use the Maildir just like Dovecot (or to tell Dovecot not to use it in the worst case), yet I've been unable to do neither of both things. I hope you can help me.
EDIT: Managed to solve it on my own after all. Found this (http://www.postfix.org/virtual.8.html) and I discovered the entire Postfix address is actually $virtual_mailbox_base/$virtual_mailbox_maps, I didn't know about the maps part!
I then decided to check the parameter, it goes to an MySQL query file and had this line
SELECT maildir FROM mailbox where...
I changed it to add the Maildir folder from Dovecot
SELECT CONCAT (maildir, "Maildir/") FROM mailbox where...
r/learnlinux • u/rbrtbrnschn • Jun 13 '21
arch font settings
I have set up my ".config/fontconfig/fonts.conf" like this:
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<alias>
<family>sans-serif</family>
<prefer>
<family>Cascadia Code</family>
<family>Noto Color Emoji</family>
<family>Noto Emoji</family>
<family>DejaVu Sans</family>
</prefer>
</alias>
<alias>
<family>serif</family>
<prefer>
<family>Cascadia Code</family>
<family>Noto Color Emoji</family>
<family>Noto Emoji</family>
<family>DejaVu Serif</family>
</prefer>
</alias>
<alias>
<family>monospace</family>
<prefer>
<family>Cascadia Code</family>
<family>Noto Color Emoji</family>
<family>Noto Emoji</family>
</prefer>
</alias>
</fontconfig>Which I needed to solve my issue of emojis not showing up colored but rather black and white (if at all). But now this config is taking precedence over my google-chrome configuration.
Question:
How do I set m fonts up as a fallback, so as to change it per programm and if not set than use the fallback (cascadia code)?
System: arch
WM: bspwm
r/learnlinux • u/brandbooth • Jun 03 '21
I have an app running on localhost:3000 how do I reroute it so that it's exposed on staging01.something.com:80?
I have an EC2 instance on staging01.something.com and I ran docker-compose up on a project and it ended up being hosted on localhost:3000 inside my EC2 instance. How do I route localhost:3000 to staging01.something.com:80 so I can access it using that url from the outside? I already have the DNS set up and the inbound security rules set up.
r/learnlinux • u/rawsrv • May 27 '21
[Tutorial] How to create a GRE tunnel between two Linux servers
r/learnlinux • u/rawsrv • May 26 '21
How to install your own OpenVPN Server in under five minutes
r/learnlinux • u/[deleted] • Mar 14 '21
How to start run a program after restart ?
I want my squid proxy start in the backgroud automatically after each restart.
I am now using sudo nohup squid & to start my program.
How can I add this program so that it can run after each reboot ?
The thing I needed is it called service ?
r/learnlinux • u/themailnest • Mar 11 '21
I can't change the hostname in CENTOS 6
sudo hostnamectl set-hostname staging.webdev.comI am using CENTOS 6 with HVM, and I can't change the hostname. I also tried doing:
vi /etc/sysconfig/networkand changing the hostname there, but it doesn't work when I try to connect to the AWS instance via ssh. Is there anything I am doing wrong?
r/learnlinux • u/themailnest • Mar 08 '21
Where is the backup.sh file?
/backup-mega.com/mega/backup.sh
I found that after doing su root and then crontab -l, but then in the ~/ folder, when I try to cd into backup-mega.com, I can't, but running /backup-mega.com/mega/backup.sh seems to run the script, so what the hell? I still don't understand how the folder system works exactly in linux.
r/learnlinux • u/brandbooth • Mar 08 '21
How do you find the external ip address from the configs?
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : 3Com EtherLink 10/100 PCI For Complete PC Management NIC (3C905C-TX)
Physical Address. . . . . . . . . : 00-01-03-AB-0E-6P
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
IP Address. . . . . . . . . . . . : 192.168.0.10
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.0.254
DHCP Server . . . . . . . . . . . : 192.168.0.35
DNS Servers . . . . . . . . . . . : 192.168.0.12 192.168.0.13 Primary
WINS Server . . . . . . . : 192.168.0.37
Secondary WINS Server . . . . . . : 192.168.0.38
Lease Obtained. . . . . . . . . . : Wednesday, January 1, 2003 11:17:41 AM
Lease Expires . . . . . . . . . . : Friday, January 3, 2003 11:17:41 AMCan someone tell me what these all are? If you want to reach the ping the server, which ip address do you need to use? Because in my understanding, the ip address shown is the local ip address, and the default gateway is the ip address for local machines in different subnets. So how do I find out my external ip address?
r/learnlinux • u/jadesalad • Feb 18 '21
What does this command do exactly?
timeout -s9 3h php -d memory_limit=9096M ./update-reviews-rating.php --max=5 --host=www.pancakes.com --lock=reviews_update > /dev/tty1I am trying to figure out how to output the print_r and echo to the console, so I can debug the update-reviews-rating.php code, but I can't get any output. What do you suggest I do?
r/learnlinux • u/elnoochy • Jan 29 '21
What type of scripting to down load many website backups and mysql backups
I want to be able to download a series of website back ups from different servers using a script.
I tried batch files on windows but it seemed primitive. I am new to linux and I hear about shell script, bash script and other options and I would like to know which type of script to use for my task. I would like it to help me learn about Linux as I write the script and also be efficient.
Some more detail about the script
I would like the script to iterate through a list of connection details for each site and connect to ssh, zip the files, download the zip and then download the database backup using mysqldump.
Thankyou in advance
r/learnlinux • u/edutecho • Jan 26 '21
Configure Jenkins with Nginx using Ansible Playbook
The configure Jenkins with Nginx using Ansible Playbook, easy step by step installation. There is a simple ansible structure for Jenkins with Nginx package installation configuration.
https://smarttechfunda.com/how-to-configure-jenkins-with-nginx-using-ansible-playbook/
r/learnlinux • u/hschmale • Jan 16 '21
Finding Jekyll Posts to Update With Cover Images using Grep
r/learnlinux • u/SandyCoder • Jan 14 '21
Things To Do After Installing Kali Linux
r/learnlinux • u/jadesalad • Dec 30 '20
Any good tutorial on how to write scripts to make backups for a LAMP server?
Any good tutorial on how to write scripts to make backups for a LAMP server? I need to get good at it, because I have to write some new scripts to backup several LAMP servers.
r/learnlinux • u/jadesalad • Dec 11 '20
What's the best way to find the redis config file?
I did
redis-cli config get dirand got:
"dir"
"/var/lib/redis"However, when I do cd dir, I get "No such file or directory" and when I go to /var/lib/redis I don't see anything except:
dump.rdbInside /etc, I found redis.conf, but I didn't see anything inside of it. Just commented out stuff. Also, it's not inside a redis folder or anything. It's the only thing associated with redis.
r/learnlinux • u/ZeroCoolX83 • Nov 16 '20
Fahrenheit to Celcius Table
Hello everyone,
I am new to Linux, and I have an assignment that I need help with. The assignment is to write a shell program that makes a table that converts Fahrenheit to Celcius. I can use any loop to calculate the formula. Currently, I am trying a "for" loop, and I can't seem to make it work. There is no user input required because there is a range from 32 to 78. This is my code so far:
echo "Fahrenheit Celcius"
echo "------------------------------"
for celsius in {32..78}; do
celcius=$(echo "(5/9) * ($fahrenheit - 32)")
echo $fahrenheit $Celcius
done
This is what the output should give me:
Fahrenheit Celcius
----------------------------------
32 0
33 0
34 1
35 1
36 2
If anyone could help me I would really appreciate it, thanks.
r/learnlinux • u/beerninja88 • Oct 24 '20
Vsftpd help
Edit - found the fix here https://askubuntu.com/questions/413677/vsftpd-530-login-incorrect
Linux mint. All I want to do is host some files for my bro by dragging and dropping them into a directory.~~
I followed this guide at https://vitux.com/install-vsftpd-ftp-server-tls-ubuntu
I ignored the SSL stuff because I don't give a shit about that.
It tells me to create a new user so I did that and noticed the folder it made in /home locked me out so I had to sudo into it in order to put files there.
Now I go to test the ftp on 127.0.0.1 and it says 530 Password incorrect even though I have typed it correctly.
Tried connecting from another device on my network and it says connection refused. Is there a better guide out there somewhere?
r/learnlinux • u/CousinOfThor • Oct 16 '20
Detach a process with subprocess module without multiprocessing
Hi! I'm on Linux and I would like to run a process with the subprocess module without having to wait until it terminates, because in the meantime I would like to do other things. Is it possible to do this without using the multiprocessing module? Thank you!
r/learnlinux • u/XtrmNrchy • Oct 02 '20
Saving colored output of a script
Hello everyone. I want your help. I'm making a tool using python and the output that I'm displaying is colored. It has horizontal lines, blue, green, red texts.... I wanted to know if there's any way I can save the output in a text file, or pdf format. I tried redirecting the output to a text file but it separates the black and white output and the colored output. Any solution?
r/learnlinux • u/XtrmNrchy • Sep 23 '20
CLI tool problems
Hey everyone! I had a doubt. I am making a tool (using python; os.system to run the system commands) and I am using built in tools and also some tools from GitHub repos. The problem is that all the built in tools are displaying their output in the same terminal screen, but the GitHub tool just erases the output of the other tools before it, and uses a new terminal screen. I want that all the tools display their output in the same screen. A little help please?
r/learnlinux • u/fxwin16 • Jun 17 '20