How to replace subscribers_ids.csv


IK7VXC Mike
 

Hi Steve,
I want to replace subscribers_ids.csv with an updated and customised version, but - even if I log in as root - I'm having trouble with such file (located under /var/lib/dvswitch): I can't remove it or overwrite it (probably because I don't have enough rights - I know, I admit I'm not a Linux expert).
So what are the proper command line instructions I should use? Sorry for the noobie question.
Thank you

Mike IK7VXC


Steve N4IRS
 

If you are root, you can do anything you want to the file.

On 12/2/21 2:55 AM, IK7VXC Mike wrote:
Hi Steve,
I want to replace subscribers_ids.csv with an updated and customised version, but - even if I log in as root - I'm having trouble with such file (located under /var/lib/dvswitch): I can't remove it or overwrite it (probably because I don't have enough rights - I know, I admit I'm not a Linux expert).
So what are the proper command line instructions I should use? Sorry for the noobie question.
Thank you

Mike IK7VXC


IK7VXC Mike
 

That's what I thought Steve. So maybe I'm doing something wrong. This is what I do:

dvswitch@echozero:~ $ sudo su
root@echozero:/home/dvswitch# cd /var/lib/dvswitch
root@echozero:/var/lib/dvswitch# rm subscriber_ids.csv
rm: cannot remove 'subscriber_ids.csv': Operation not permitted
root@echozero:/var/lib/dvswitch#


Jorge (George)
 

sudo systemctl stop analog_bridge, then you can remove the file


IK7VXC Mike
 

Thanks Jorge, but it keeps spitting out "operation not permitted", I don't know why.

Mike IK7VXC


Steve N4IRS
 

Show ls -la

On 12/4/21 4:45 PM, IK7VXC Mike wrote:
Thanks Jorge, but it keeps spitting out "operation not permitted", I don't know why.

Mike IK7VXC


IK7VXC Mike
 

drwxr-xr-x  4 root     root         4096 Jun  3  2021 .
drwxr-xr-x 36 root     root         4096 Dec  3 18:10 ..
drwxr-xr-x  5 root     root         4096 Dec  2 17:41 dvs
drwxr-xr-x  2 root     root         4096 Jun  3  2021 mio
-rw-r--r--  1 dvswitch dvswitch 11385982 Apr 11  2021 subscriber_ids.csv
root@echozero:/var/lib/dvswitch#


Steve N4IRS
 

Why would the file be owned by dvswitch?

On 12/4/21 4:49 PM, IK7VXC Mike wrote:
drwxr-xr-x  4 root     root         4096 Jun  3  2021 .
drwxr-xr-x 36 root     root         4096 Dec  3 18:10 ..
drwxr-xr-x  5 root     root         4096 Dec  2 17:41 dvs
drwxr-xr-x  2 root     root         4096 Jun  3  2021 mio
-rw-r--r--  1 dvswitch dvswitch 11385982 Apr 11  2021 subscriber_ids.csv
root@echozero:/var/lib/dvswitch#


IK7VXC Mike
 

Good question. How can I rectify that?


Steve N4IRS
 

show:
lsattr subscriber_ids.csv

On 12/4/21 4:52 PM, IK7VXC Mike wrote:
Good question. How can I rectify that?


IK7VXC Mike
 

root@echozero:/var/lib/dvswitch# lsattr subscriber_ids.csv
----i---------e---- subscriber_ids.csv
root@echozero:/var/lib/dvswitch#


Steve N4IRS
 

chattr -i subscriber_ids.csv
rm subscriber_ids.csv

On 12/4/21 5:03 PM, IK7VXC Mike wrote:
root@echozero:/var/lib/dvswitch# lsattr subscriber_ids.csv
----i---------e---- subscriber_ids.csv
root@echozero:/var/lib/dvswitch#


IK7VXC Mike
 

Thank you Steve. Problem solved. 

Mike IK7VXC


Jorge (George)
 

I'm wrong at my toughts, Steve give the answer, sorry....