You are not logged in.
I use a script to update various local files with the newer versions available online. Suddenly, after many months of use, today it stopped working.
Commands like:
sudo wget ftp://ftp.internic.net/domain/named.cache -O /usr/local/share/named
or
sudo wget https://svn.nmap.org/nmap/nmap-os-db -O /usr/share/nmap/nmap-os-db
fail with a "read-only file system" error, but if I create or edit the same outfile file with "sudo nano" it works.
Same thing with other folders in /usr or /etc. I fsck'ed the partition and there are no errors, nor it's mounted read-only (I can create or delete any file I want).
I noticed those root-owned folders have rwxr-xr-x permission so maybe that's the problem, but I installed Arch months ago and didn't touch permissions, so I don't know if either a recent update (via pacman) changed them, or if it's something else. Any idea?
Last edited by eleius (2018-02-17 16:11:32)
Offline
If you're sure it was today that it stopped working; then have a look at what's different, have you updated anything, or made changes to something? Check the pacman log to jog your memory.
Offline
mount
type wget
stat `which wget`and you may want to strace the call (don't sudo strace, but run it as root. "sudo strace foo" won't work)
Offline
...why are you running wget as root anyway.
Offline
Because he wants it to directly write into a root owned path.
Probably not the smartest of all approaches, but it shouldn't fail this way either.
Offline
mount type wget stat `which wget`
$ stat `which wget`
File: /usr/local/bin/wget -> /usr/bin/firejail
Ah, that's the culprit! I recently installed firejail and it seems it also has a profile for wget.
Solved, thanks for your help!
Offline
...why are you running wget as root anyway.
You're right, now I changed it to wget to tmp and only use sudo to move the file to the destination directory.
Offline