Monday, May 16, 2022

Recent Questions - Unix & Linux Stack Exchange

Recent Questions - Unix & Linux Stack Exchange


TAB completion not working on mounted partition

Posted: 16 May 2022 06:14 PM PDT

I'm used to mount a Windows partion (G) into my Windows Subsystem for Linux (running Ubuntu 20.04) by giving the following commands:

sudo mkdir /mnt/g    sudo mount -t drvfs G: /mnt/g  

The partition seems to be mounted correctly, since I can access to its content from Ubuntu. However, writing in a shell, TAB completion of directories or files does not work at all.

How could I solve this issue? Thanks in advance!

/run/udev/tags/ on a Kubuntu VM: Cannot remove 'snap_firefox_firefox' after uninstalling Firefox. What are these files?

Posted: 16 May 2022 05:56 PM PDT

I am trying to completely uninstall Firefox in a VM, which I did via:

snap disable firefox  snap remove --purge firefox  

But an FSearch query turned up the following:

enter image description here

There is next to nothing on the web when I search for this. How do I remove these residual snap references? What are these files / references?

enter image description here

Any help would be greatly appreciated!

Connecting To a WiFi with dynamic IP and Ethernet Cable with Static IP in Arch Linux and Maintaining Internet

Posted: 16 May 2022 05:31 PM PDT

So let me preface this question by stating that I am not so well versed in the linux ways hence simple explanations are appreciated. On to the question at hand.


Question

I am currently running an Arch Linux server (selected the server option in the archinstall script) its mostly to run docker containers, its connected to the internet using WiFi. I recently decided to connect some of the devices to the server via a network switch (it's an unmanaged/plug-and-play switch). Since the network switch is unmanaged I know that I need to manually assign ip address to the devices connected to it. The problem is that I can, at any given point, only get one of the 2 networks working fine on the system.

If I configure the Ethernet then the WiFi network no longer has access to the internet (still connected to the WiFi network, just no internet access). If I disable the Ethernet then then I have internet access but no access to the devices connected in the wired LAN. How do I solve this so that both networks are connected and still have access to the internet?


What I tried:

I followed the guide found here. I tried both the netctl method and the systemd method. I would like to say that I had more luck with the netctl method for a static IP for the Ethernet network, but that's just because it's easier to do.

Since netctl can also be used to connect to a WiFi network I tried to use that to connect to the WiFi instead of iwctl, I figured maybe its not working cause its 2 different scripts/programs managing them. But that didn't work as netctl just didn't connect to the WiFi network. I used the examples provided by them, "wireless-wpa", and tweaked the contents to match what I had. At first it didn't work cause the passkey was getting rejected, so I got the encrypted passkey using "wpa_passphrase" and used that, but that didn't work either. It just said 'wpa authentication failed' (might not be exactly that, I did revert everything before typing the question, so the details are a bit off in error messages)

I did think maybe I was changing too much of what the netctl ethernet example had so here's an example of what it looked like after my changes

Description='A basic static ethernet connection'  Interface=enp0s26  Connection=ethernet  IP=static  Address=('192.168.1.102/24')  Gateway=('192.168.1.1')  DNS=('8.8.8.8' '8.8.4.4')    + whatever was there after DNS (I didn't touch those)  

Yes, all I did was change the interface name but I figured I should show what the config I used was.


How Did I Check the Connections:

I used ping.

Check for internet access was ping www.google.com.

Check for ethernet connection was ping 192.168.1.22 (IP I set for my windows machine)


Misc.

the netctl example for static IP ethernet has a different IP for DNS. I did try that as well. But no dice there, I'm pretty sure it looked like this:

Description='A basic static ethernet connection'  Interface=enp0s26  Connection=ethernet  IP=static  Address=('192.168.1.102/24')  Gateway='192.168.1.1'  DNS=('192.168.1.1')    + whatever was there after DNS (I didn't touch those)  

As I started typing in the Title for the question I did run across this Stack Exchange question, but I have no idea whats going on there.

While installing Debian KDE on i386 computer, Locks me out unexpectedly

Posted: 16 May 2022 05:00 PM PDT

I have a Toshiba Satellite M105 currently installing Debian KDE 11 and after around 5 mins, locks me out unexpectedly and the password to get back in is unknown. Help?

I have not touched any settings whatsoever since the software is currently installing.

How to remove line with specific string from file

Posted: 16 May 2022 06:44 PM PDT

Note the text file like this:

/home/user1/dir1  /home/user1/dir2  /home/user1/  /home/user1/dir1/dir11  

Goal is to remove line that has just "/home/user1/", nothing besides that, so end result should be:

/home/user1/dir1  /home/user1/dir2  /home/user1/dir1/dir11  

Tried with code below, but it removed all lines that contains /home/user1/ in it. Any idea how this should be done?

grep -v "/home/user1/" /home/user1/input.txt > tmpfile && mv tmpfile /home/user1/output.txt  

How to suppress PAM audit logs for RHEL8?

Posted: 16 May 2022 03:32 PM PDT

I have a system that is getting a ton of audit traffic for a particular account we will call 'redacted'. The logs are showing this account executing the su command. My first instinct was to check the rules in etc/audit/rules.d and disable any rules having to do with su and to add a rule suppressing logging for that account. I was still getting these logs so I wiped out the audit rules to have a blank slate. (auditctl -l No Rules)

I was still seeing these logs so my question is are these coming from the PAM modules and is there a way to suppress them?

type=CRED_DISP msg=audit(1652729209.332:1763023): pid=375379 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:unconfined_service_t:s0 msg='op=PAM:setcred grantors=pam_rootok acct="redacted" exe="/usr/bin/su" hostname=? addr=? terminal=? res=success'UID="root" AUID="unset"  type=USER_AUTH msg=audit(1652729210.442:1763024): pid=375600 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:unconfined_service_t:s0 msg='op=PAM:authentication grantors=pam_rootok acct="redacted" exe="/usr/bin/su" hostname=? addr=? terminal=? res=success'UID="root" AUID="unset"  type=USER_ACCT msg=audit(1652729210.443:1763025): pid=375600 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:unconfined_service_t:s0 msg='op=PAM:accounting grantors=pam_succeed_if acct="redacted" exe="/usr/bin/su" hostname=? addr=? terminal=? res=success'UID="root" AUID="unset"  type=CRED_ACQ msg=audit(1652729210.446:1763026): pid=375600 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:unconfined_service_t:s0 msg='op=PAM:setcred grantors=pam_rootok acct="redacted" exe="/usr/bin/su" hostname=? addr=? terminal=? res=success'UID="root" AUID="unset"  type=USER_START msg=audit(1652729210.462:1763027): pid=375600 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:unconfined_service_t:s0 msg='op=PAM:session_open grantors=pam_keyinit,pam_limits,pam_systemd,pam_unix,pam_lastlog,pam_umask,pam_xauth acct="redacted" exe="/usr/bin/su" hostname=? addr=? terminal=? res=success'UID="root" AUID="unset"  

How do I connect to a Wi-Fi network from a Kali Linux live USB?

Posted: 16 May 2022 05:06 PM PDT

I am on a MacBook Pro and my primary operating system is macOS. When I am on macOS, I am fully able to browse the internet and connect to Wi-Fi networks, but when running a Kali Linux live USB, I am unable to connect to Wi-Fi. The network name appears, and when I click on it, I am prompted to enter a password, but then it continues to prompt me to enter a password and never actually connects me to the network. My friend suggested I purchase a USB Wi-Fi adapter, but I believe you need to use sudo apt to install the drivers for them, which requires internet access in the first place, and I do not know of any adapters that are automatically supported by Kali that don't require drivers to be installed. TL;DR: I can't connect to Wi-Fi networks on my Kali Linux live USB, even though I can use the internet fine on my main OS, so I don't think it is an issue with my Wi-Fi card. All help is appreciated.

Cannot login after enabling pam_faillock module

Posted: 16 May 2022 05:44 PM PDT

I am running Ubuntu 20.04 LTS. I enable the pam_faillock module by adding the following two lines in /etc/pam.d/common-auth.

auth     [default=die]  pam_faillock.so authfail                             auth     sufficient     pam_faillock.so authsucc  

I add these lines below

auth  [success=2 default=ignore]     pam_unix.so nullok  

And above:

auth  [success=1 default=ignore]    psm_sss.so use_first_pass  

After I add these lines I uncomment the following lines from /etc/security/faillock.conf

audit  silent  deny = 3  fail_interval = 900  unlock_time = 0  

After these changes I reboot, when I try to login after reboot it tells me the password is incorrect. (Yes I have verified it's not a bad password) I am not the strongest in this area and I am unsure what is causing this to happen.

How to attach new terminal with existing process and subprocesses?

Posted: 16 May 2022 02:46 PM PDT

I'm trying to us reptyr to reattach new cloud shell to an existing program running on an ubuntu virtual machine.

when running sudo reptyr PID I get the following error:

Process PID (sudo) shares PID's process group. Unable to attach.  

When running sudo reptyr PID -T I also net a new error:

Child is not connected to a pseudo-TTY. Unable to steal TTY.  Unable to attach to pid PID: Invalid argument  

Is there any other way to attach new shell to existing program so that I can see the logs in real-time without restarting?

Does this dmesg log show files being transferred?

Posted: 16 May 2022 02:43 PM PDT

An issue was recently opened on the GitHub page for the privacy-focused VirtualBox wrapper HiddenVM. The opener posts what he claims to be indication of files from his local cache being sent to an external IP:

When i used dmesg i saw what it did in the background. I picked two messages out of many:

audit: type=1400 audit(1651914430.711:1128): apparmor="DENIED" operation="open" profile="torbrowser_firefox"  name="/home/amnesia/.cache/thumbnails/large/3678dc849747c84908498dd948db8f71.png"  pid=10995 comm="pool-firefox"  requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000    Dropped outbound packet: IN= OUT=wlan0 SRC=i removed the adress DST=i removed the adress LEN=48 TC=0 HOPLIMIT=255 FLOWLBL=762031  PROTO=ICMPv6 TYPE=133 CODE=0 UID=0 GID=0  

So it looks like it sent files from my cache to some address. Like why does a script that is supposed to change settings open cache files and sends them somewhere?

The opener doesn't say exactly what commands they used or give any further details.

Do these two messages indicate files being sent from the local machine to an external IP?

When copy address for wget other files download

Posted: 16 May 2022 02:24 PM PDT

I was given a shared directory with files on owncloud. To download only some of them to my directory on a remote server, I right-click on a file name, copy the link address and use

wget --no-check-certificate -O 1_S1_L001_R1_001.fastq.gz https://url/index.php/s/download?path=%2F&files=1_S1_L001_R1_001.fastq.gz  

instead of downloading just that one file, it tries to download all the files from the directory and crashes because of memory shortage. How do I download files separately in this case?

P.S.: if I just click on the filename on a web browser, it downloads the exact file I need. So wget should download just that file, right? Why does it load all the files?

How to install software with outdated set of libraries into a new system without conflicts?

Posted: 16 May 2022 02:46 PM PDT

I have an issue with some proprietary software: it was created a long time ago, requires RHEL5 and a set of libs like motif22, pcre v1, fortran and stuff like that. It widely limits the choice of operating systems I need to follow as Centos/RHEL7 is the last one I was able to find the required set of libraries on the wild. Their number is large (more than 200 with some dependencies).

Now, as I have an idea to upgrade, I have a choice: whether install RHEL/Centos 7 or think of a way to isolate the proprientary software together with its libraries inside its sort of container. Software performs mathematical computations, works with special hardware and performs frequent but low network usage.

The idea of virtual machine is not a good choice, because the software is the only purpose of workstations it is being installed so I need to provide full computational power of it to software.

What is a best choice here? Basically I need to install old proprietary software with old set of libraries (even with i686 architecture) into x64 Linux box, but it should be separate from system libraries. I do not need anything else as constraints to network, CPU, GPU, RAM or other limits. Just installation issues.

I was thinking about flatpak style of setup, but it requires thorough understanding together with extensive testing - something that I cannot afford right now due to the lack of time. So please, could you suggest me what can be applicable to that purpose?

Thank you.

Perform backup (and restore) from my current LFS (Linux From Scratch) progress with dd command

Posted: 16 May 2022 01:38 PM PDT

I have my LFS proyek, currently I'm in chapter 10 so far according this book https://www.linuxfromscratch.org/lfs/view/stable/chapter10/grub.html .

I want to perform backup of my LFS progress so if there's mistake I can restore its checkpoint, currently my LFS progress and its content are saved in /dev/vdb. I have umounted dev/vdb , now I want to copy or backup all content in /dev/vdb with dd command and give format name backupLFS.disk so it will be safely saved in LFS Host (in my case is ubuntu), but I realized it's dangerous enough if I wrong put parameter mainly confused with of and if. So what should I do?

Bash script segmentation fault

Posted: 16 May 2022 02:13 PM PDT

My assignment is to write a bash script that reads a directory and returns the file type of each file within, including all subdirectories. Using the find command is not allowed. I've tried to implement this using essentially two for loops, but I'm getting a segmentation fault. I found that the script does work however when I pass a directory without subdirectories. Would someone be willing to look over a noob's code and tell me what's wrong? Thank you very much.

#!/bin/bash  func () {  for name in $1  do    if [ -f "$name" ]    then      file "$name"    elif [ -d "$name" ]    then      func "$1"    fi  done  }    directory="$1/*"  for name in $directory  do    if [ -f "$name" ]    then      file "$name"    elif [ -d "$name" ]    then      func "$1"    fi  done  

awk/sed split a cluster file in to multiple files

Posted: 16 May 2022 06:50 PM PDT

I have a cluster fasta file (called file) which looks like:

>1AB2  >1AB2 AA  NWWIEUNJRNIBGOWNGIOWGRBIGBRGRIOWGI  NCIDHFR8EHGBVPIWOBGIGRI  >1AB3 AA  WNIOREHUEBRGOUERGHBERGIORBGREUGEGO  NWFWRUBGREOUEREOBRIOBNERIOBN  >1SC4 AA  WNIOREHUEBRGOUERGHBERGIORBGREUGEGO  NWFWRUBGREOUEREOBRIOBNERIOBN  >2CD5 AA  WNIOREHUEBRGOUERGHBERGIORBGREUGEGO  NWFWRUBGREOUEREOBRIOBNERIOBN  >2AC6  >2AC6 AA  NFIGEURHGEIROHEGHTUTJGENLJBBEOWRIU  NFIROUHBOERVERUGBERUOVREOIBROEBVUE  NVHIRE  >2ONM AA  BUCIEHBUORBREOBWQVURVELLAJFLHIEBGR  NHEIBVEURIGBVNRIHEOEAJVSJDNHVUGBVR  NEBIBVVBRU  >2POD AA  BUFEWIBOEUWBWOREBRIUBGUERIGBVOSRIP  BUEIBVEO  >7KZL  >7KZL AA  BUIREBVAUREVBREOIRGPNJBFDVERUBVROR  >6HG3  >6GH3 AA  NBVUIREVOIAWRHRUGRTYUVDNJKDFHUGSEI  FHUIERBLUUIREB  >6GH4 AA  BDFUIGEVUERERHOBERIHBSDLKFJBNIERIH  NFHILRUGAURHG  

the about file has 4 groups: 1AB2, 2AC6, 7KZL, and 6GH3. the content during the first >1AB2 and the first >2AC6 belongs to the cluster 1AB2. the content during the first >2AC6 and the first >7KZL belongs to the cluster 2AC6.

I want to separate the file into 4 files at the second >XXXX. each file should look like:

file_1

>1AB2 AA  NWWIEUNJRNIBGOWNGIOWGRBIGBRGRIOWGI  NCIDHFR8EHGBVPIWOBGIGRI  >1AB3 AA  WNIOREHUEBRGOUERGHBERGIORBGREUGEGO  NWFWRUBGREOUEREOBRIOBNERIOBN  >1SC4 AA  WNIOREHUEBRGOUERGHBERGIORBGREUGEGO  NWFWRUBGREOUEREOBRIOBNERIOBN  >2CD5 AA  WNIOREHUEBRGOUERGHBERGIORBGREUGEGO  NWFWRUBGREOUEREOBRIOBNERIOBN  

file_2

>2AC6 AA  NFIGEURHGEIROHEGHTUTJGENLJBBEOWRIU  NFIROUHBOERVERUGBERUOVREOIBROEBVUE  NVHIRE  >2ONM AA  BUCIEHBUORBREOBWQVURVELLAJFLHIEBGR  NHEIBVEURIGBVNRIHEOEAJVSJDNHVUGBVR  NEBIBVVBRU  >2POD AA  BUFEWIBOEUWBWOREBRIUBGUERIGBVOSRIP  BUEIBVEO  

file_3

>7KZL AA  BUIREBVAUREVBREOIRGPNJBFDVERUBVROR  

file_4

>6GH3 AA  NBVUIREVOIAWRHRUGRTYUVDNJKDFHUGSEI  FHUIERBLUUIREB  >6GH4 AA  BDFUIGEVUERERHOBERIHBSDLKFJBNIERIH  NFHILRUGAURHG  

Text messed up with freetype

Posted: 16 May 2022 04:57 PM PDT

Some programs have messed up text rendering, most noticeably in discord, regardless of what distro or computer I am using. Other people were having the same issue in this reddit post.

I have tried various distros, computers, and window mangers, but no matter what, fonts are always broken. The issue is likely with freetype, one of the few constants. The solutions shown in the reddit thread did not help, although I didn't try downgrading freetype, which isn't the kind of solution I want anyway. Although the issue has occurred everywhere, I am presently testing on Arch with DWM.

How it should look.

How it should look.

How it does look.

How it looks.

Edit: This comparison should make the difference more clear. Top is how it normally looks, bottom is how linux looks. How it normally looks is like bold text in comparison. Comparison

Is cp faster than rsync during the first run?

Posted: 16 May 2022 04:53 PM PDT

I am currently using rsync to copy a 73GB file from a Samsung portable SSD T7 to an HPC cluster.

rsync -avh path/to/dataset me@server.somewhere:/path/to/dest  

The following applies:

  1. My local machine (where my T7 is connected) is a VirtualBox VM running Ubuntu 20.
  2. The T7 transfer speeds should be up to approx. 1000MB/s.
  3. Network gives me an approximate upload speed of 7.9Mbps.
  4. Rsync transfer speed is probably bottlenecking this to 1-5MB/s according to this answer.

The problem is that the move is still not done after 9 hours. According to 1, using cp instead is better with an empty directory (for the first time). I do not understand this or whether it is actually true. Can someone explain this?

iptables: Failure when trying to block port access for most IP addresses, except for a few

Posted: 16 May 2022 05:43 PM PDT

I am using Debian 8 linux.

I'm trying to block input access to a few ports for most IP addresses, except for a small, select list of IP addresses. I am doing the following, but it does not seem to work:

% sudo /sbin/iptables -v -A INPUT -p tcp -m set '!' --match-set allow-list src -m multiport --dports 110,143,993,995 -j DROP  

Whenever there is an access attempt to any of those ports from an IP address that is not in allow-list, that attempt is still succeeding.

These are the first few lines of allow-list:

% sudo /sbin/ipset list allow-list  Name: allow-list  Type: hash:net  Revision: 6  Header: family inet hashsize 16384 maxelem 262144  Size in memory: 687888  References: 2  Members:  125.8.0.0/13  160.94.0.0/15  104.37.68.0/22  205.233.22.0/23  [ ... more CIDR entries ... ]  

And this is the current iptables configuration:

% sudo /sbin/iptables -L  Chain INPUT (policy ACCEPT)  target     prot opt source               destination           DROP       tcp  --  anywhere             anywhere             ! match-set allow-list src multiport dports pop3,imap2,imaps,pop3s    Chain FORWARD (policy ACCEPT)  target     prot opt source               destination             Chain OUTPUT (policy ACCEPT)  target     prot opt source               destination           

What am I doing incorrectly?

Thank you very much in advance.

How to parse an escaped json string with ansible/jmespath/jq?

Posted: 16 May 2022 04:38 PM PDT

I'm using the Ansible module for Bluecat to make an authorized API call to get some information about a subnet. The response looks something like this:

"result": {          "changed": false,          "failed": false,          "json": "b'{\"id\":12345,\"name\":\"SUBNET NAME\",\"properties\":\"CIDR=10.2.2.0/24|allowDuplicateHost=enable|pingBeforeAssign=disable|inheritAllowDuplicateHost=true|inheritPingBeforeAssign=true|gateway=10.2.2.1|inheritDNSRestrictions=true|inheritDefaultDomains=true|inheritDefaultView=true|\",\"type\":\"IP4Network\"}\\n'",          "msg": "",          "status": 200  }  

As you can see, all the useful data is in that json field, but it's some string literal abomination with escaped quotes and newlines. If I run

- debug:        msg: "{{ result | json_query('json.name') }}"  

in Ansible, it gives me back the msg field instead! I can get the entire json field, but not anything inside it. If I tinker with it a little bit and trim the b at the beginning, the inner single quotes, and the extra backslash by the newline at the end, then jq .json | fromjson parses it correctly. But I'm fairly certain b'' just means byte encoding and shouldn't break the parsing, but it does. And what's with the double backslashes at the end?

Do I have any options beyond using some sed black magic to wipe out all of the escape characters? Why would a web API return a string literal like this?

Send specific signals to systemd for service shutdown

Posted: 16 May 2022 03:39 PM PDT

I have a remote server and connect via a browser to Jupyter notebooks hosted there. The jupyter service is run via systemd. The problem is that jupyter expects two ctrl-c commands within 5 seconds of each other to shut down cleanly. systemd sends only one signal to halt the process, then waits for a timeout, and when it sees that jupyter hasn't stopped, finally sends a kill signal. This leads to a long delay and an unclean exit when I want to stop or restart the service. I know that systemd has an ExecStop parameter but can't find any examples of how it is actually used, and how I can send the equivalent of two ctrl-c keystrokes via this mechanism.

My current service file is:

[Unit]      Description=Jupyter notebook    [Service]      Type=simple      PIDFile=/var/run/jupyter-notebook.pid      ExecStart=/home/linuxbrew/.linuxbrew/bin/jupyter notebook --no-browser      User=pgcudahy      Group=pgcudahy      WorkingDirectory=/home/pgcudahy      Environment=PATH=/home/linuxbrew/.linuxbrew/opt/python/libexec/bin:/home/linuxbrew/.linuxbrew/opt/cython/bin:/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:/home/pgcudahy/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin    [Install]      WantedBy=multi-user.target  

How to fix FTP permission issue?

Posted: 16 May 2022 03:04 PM PDT

Have set up an FTP server and user. but it seems I'm unable to upload or edit any file.

Even though the user has filled 777 permission. I can't even upload files to the user's root folder.

Server OS: Ubuntu

Client OS windows

FTP server/ Client: fileZila

Log:

Status: Connection established, waiting for welcome message...  Status: Insecure server, it does not support FTP over TLS.  Status: Server does not support non-ASCII characters.  Status: Logged in  Status: Starting download of /var/www/html/wp/staged/wp-content/themes/Newspaper/Newspaper/woocommerce/single-product.php  Status: File transfer successful, transferred 1,193 bytes in 1 second  Status: Starting download of /var/www/html/wp/staged/wp-content/themes/Newspaper/Newspaper/woocommerce/single-product.php  Status: File transfer successful, transferred 1,193 bytes in 1 second  Status: Starting upload of C:\Users\User\AppData\Local\Temp\fz3temp-2\single-product.php  Command:    PASV  Response:   227 Entering Passive Mode (165,227,173,119,117,244).  Command:    STOR single-product.php  Response:   550 Permission denied.  Error:  Critical file transfer error  

File permission:

File permission

Groups and users:

Groups and users

vsftpd.conf:

# Standalone mode  listen=YES  max_clients=200  max_per_ip=4  # Access rights  anonymous_enable=YES  local_enable=NO  write_enable=YES  anon_upload_enable=YES  anon_mkdir_write_enable=NO  anon_other_write_enable=NO  # Security  anon_world_readable_only=NO  connect_from_port_20=YES  hide_ids=YES  pasv_min_port=50000  pasv_max_port=60000  # Features  xferlog_enable=YES  ls_recurse_enable=NO  ascii_download_enable=NO  async_abor_enable=YES  # Performance  one_process_model=YES  idle_session_timeout=120  data_connection_timeout=300  accept_timeout=60  connect_timeout=60  anon_max_rate=50000  anon_mkdir_write_enable=NO  anon_other_write_enable=NO    #Userlist    userlist_deny=NO  userlist_enable=YES  userlist_file=/etc/vsftpd.allowed_users  

vsftpd.allowed_users:

ftpuser  

Any idea what's going on here?

Update: I have changed the permission of the folder that holds the file to 777, and it still doesn't work.

parent folder permission

log:

Status: Logged in  Status: Starting download of /var/www/html/wp/staged/wp-content/themes/Newspaper/Newspaper/woocommerce/single-product.php  Status: File transfer successful, transferred 1,193 bytes in 1 second  Status: Starting upload of C:\Users\User\AppData\Local\Temp\fz3temp-2\single-product.php  Command:    PASV  Response:   227 Entering Passive Mode (*xxxxxxxxxxxx*).  Command:    STOR single-product.php  Response:   550 Permission denied.  Error:  Critical file transfer error  Status: Retrieving directory listing of "/var/www/html/wp/staged/wp-content/themes/Newspaper/Newspaper"...  Status: Directory listing of "/var/www/html/wp/staged/wp-content/themes/Newspaper/Newspaper" successful  Status: Disconnected from server  Status: Connection closed by server  

The service is actually an init script but the system is managed by systemd warning

Posted: 16 May 2022 06:00 PM PDT

After execute manually systemctl start example.service then it starts up but not as part of ansible automatically, while other applications with same config it starts up. What does The service is actually an init script but the system is managed by systemd warning meaning? The other apps what starts up doesnt have this warning.

Ansible script:

- name: Enable service    service: name=example enabled=yes  

Ansible log:

TASK [provision-app : Enable service] ***********************  Sunday 08 December 2019  17:25:42 +0000 (0:00:01.100)       0:00:28.007 *******    [WARNING]: The service (example) is actually an init script but  the system is managed by systemd  

service files:

/run/systemd/generator.late/example.service  /run/systemd/generator.late/runlevel5.target.wants/example.service  /run/systemd/generator.late/runlevel4.target.wants/example.service  /run/systemd/generator.late/runlevel3.target.wants/example.service  /run/systemd/generator.late/runlevel2.target.wants/example.service  

.Service file:

# Automatically generated by systemd-sysv-generator    [Unit]  Documentation=man:systemd-sysv-generator(8)  SourcePath=/etc/rc.d/init.d/example  Description=SYSV: Application Suite  Before=runlevel2.target  Before=runlevel3.target  Before=runlevel4.target  Before=runlevel5.target  After=network-online.target  After=network.service    [Service]  Type=forking  Restart=no  TimeoutSec=5min  IgnoreSIGPIPE=no  KillMode=process  GuessMainPID=no  RemainAfterExit=yes  ExecStart=/etc/rc.d/init.d/example start  

systemctl status:

   Loaded: loaded (/etc/rc.d/init.d/example; bad; vendor preset: disabled)     Active: inactive (dead)       Docs: man:systemd-sysv-generator(8)  

How to zoom/magnify on linux without compiz (bspwm)

Posted: 16 May 2022 02:02 PM PDT

I'd like to have the functionality described in this video. Basically, use super+scrollup/down or pinch in/out on my touchpad to zoom in a certain area of the screen like on a phone or tablet.

Sadly I need compiz to get the described effect. How can I zoom in without using compiz?

I'm using Arch Linux with bspwm + compton.

What I've tried:

  • xzoom, which can zoom but spawns a new window instead of zooming in on the spot. Not what I want.
  • KDE's kmag, pretty much the same as xzoom but with a nice GUI.
  • Magnifier, where you can mouse over an area to zoom that area of the screen, which is not really what I want. I want to actually zoom in the whole screen like in the video above.

There's are open issues in compton's repositories:

How to find gnome-terminal currently used profile with cmd line?

Posted: 16 May 2022 07:03 PM PDT

I'm using Ubuntu 16.04 and I want to be able to tell which profile is used by a given terminal emulator. Just the name would be enough.

It's trivial to find with GUI : just right click in the terminal window, and the profile in use will be indicated under "Profiles". You can also go Edit -> Profile Preferences -> Profile Name.

I would like to access that information with command line, but can't find how.

How to sync bookmarks (favourites) between Google Chrome and Chromium

Posted: 16 May 2022 05:03 PM PDT

I'm new to the world of Raspberry 2 and Linux and I have install Chromium on the Raspberry. I did this because I thought it would be a good way to access my Google Chrome Bookmarks (Favourites). However, I'm having problems. When I log into Chromium in order to sync, I get the message:

The sync server is busy, please try again later.

I've tried a few hours later, next day, etc. I suspect the sync server being busy is not the problem.

Can anyone tell me how to fix this problem and help me sync my bookmarks?

The version of Chromium is:22.0.1229.94. I vaguely understand it's possible to get a later version. I'm new to Linux and would have to be told the explicit steps to do so. The Linux I'm running came with the Raspberry 2 and is some flavor of Debian (I'd report the version number if I knew where to look!).

Finally, I'm not wedded to Chromium. I just want a browser where I can see my Chrome bookmarks and (ideally) have them synced every time I add a bookmark to Chrome or the browser on Raspberry.

"Error uncleared PCH FIFO underrun on transcoder A" during boot centos 7 on toshiba

Posted: 16 May 2022 04:01 PM PDT

I have toshiba Satelite model (C50 1001C model number) laptop. When I start it is giving

1.643361 [drm:cpt_serr_int_handler] *ERROR*  uncleared PCH FIFO underrun on transcoder A  1.643363 [drm cpt_serr_int_handler] *ERROR* pch transcoder a fifo underrun  

In this laptop, I have an important installation and source code, I just searched but I did not get any correct solution.

Precedence of the shell logical operators &&, ||

Posted: 16 May 2022 04:20 PM PDT

I am trying to understand how the logical operator precedence works in bash. For example, I would have expected, that the following command does not echo anything.

true || echo aaa && echo bbb  

However, contrary to my expectation, bbb gets printed.

Can somebody please explain, how can I make sense of compounded && and || operators in bash?

Can I select only one result from a bash glob?

Posted: 16 May 2022 02:13 PM PDT

I'm trying to write a script for work to automate some reporting on an output. The Log files are (currently, it's being 'standardise' in the future) stored in this sort of path structure:

/<root_path>/<process_one_path>/logs/<time_date_stamp>/<specific_log_file>

/<root_path>/<process_two_path>/logs/<different_time_date_stamp>/<specific_log_file>

Every part of the path is known except the time date stamps, which are always the latest in the folder.

If I try to use a wild card in place of the time date stamp, I get multiple results, e.g.:

> ls /<root_path>/<process_two_path>/logs/* [tab]  20130102-175103  20130118-090859  20130305-213506  

I only want it to return the latest one, is this possible with Bash?

NB (I don't have zsh, and as lovely as it sounds I doubt we'll ever get it at work)

Determine what program is in my MBR code

Posted: 16 May 2022 01:54 PM PDT

I've done a lot of partitioning / dual booting on my Macbook Pro. Right now I have Mac OS X installed along with Ubuntu 12.04, with Grub installed on the Ubuntu partition.

I am wondering - what is the code in my MBR (the first 446 bytes)? Because Macs use EFI and GUID partitioning, the MBR is only a protective/hybrid MBR (in my case, it is a hybrid MBR).

Q: How can I identify what program is in my MBR (based on its hexdump)? Is there some sort of a signature? I'm guessing it's grub but I did a hexdump of it and it didn't match the code I found in this article detailing the Grub MBR ("Stage 1") code.

EDIT: I am runnning rEFInd, an EFI bootmanager program. It is an EFI application, and thus resides on my EFI system partition. This program is what runs immediately following bootup, but I do not think it places any code in the 446 bytes of the MBR.

EDIT2: I should add that I have had Windows installed for dual-boot as well.

No comments:

Post a Comment