« first day (3270 days earlier)      last day (31 days later) » 

1:16 AM
That seems to have killed all conversation.
Anyway, here's something that cannot be misinterpreted:
Good night to myself!
0:-)
 
 
5 hours later…
6:05 AM
@Fabby Good night to you too.
(Weekends are usually not busy for SE chatrooms. And this one is rarely busy at any time.)
 
 
5 hours later…
11:26 AM
@Kusalananda do you know why this would happen? I think this is a very interesting question!
-3
Q: File permissions not working

Nitin KumarA file on my CentOS does not have write permission and can not be edited using vim. But using echo it can be written, why? [root@srv chap2]# cat raj.txt Hello World [root@srv chap2]# ls -l raj.txt ---------- 1 root root 12 Sep 22 17:37 raj.txt [root@srv chap2]# echo "Hello World Again" >>...

Shell redirection can edit the file, and so can nano. But emacs and vim cannot. I suspect it has something to do with the latter two editing temp files, while nano actually opens the original (askubuntu.com/a/444079/85695).
 
11:51 AM
I would bet on a read-only filesystem for now... or too many inode in /var
 
@Archemar No, I can reproduce it simply by logging in as root, then touch file; chmod 000 file.
Then, nano will let me edit it, and I can echo foo > file, but both emacs and vim open it read only (as root).
[root@tpad foo]# ls -l
total 4
---------- 1 root root 14 Sep 22 14:29 file
[root@tpad foo]# echo foo > file
[root@tpad foo]# ls -l
total 4
---------- 1 root root 4 Sep 22 14:57 file
[root@tpad foo]# cat file
foo
But try vim file or emacs file and you're told it's read-only. But nano file lets you edit it with no problem.
I really think it's related to how nano works differently:
13
A: 'tail' command not getting only the new lines

terdonFirst, you get the error because you are using a text editor for this. This means that every time you open the file, edit and save it, the original is overwritten with the new contents. Whether you added a single line to the end or 100 lines all over the place is irrelevant, the point is that the...

I was wrong about vi. Using w! does let me write it. But still, it's weird that vi, nano and emacs behave differently. I would expect the file system permissions to be dealt with at a lower level than whatever application is opening the file.
 
 
2 hours later…
2:17 PM
@terdon I left a comment. Basically, the editors that refuse to write the file for root are implementing a safety check. Root would be able to override it, but it's there anyway. The shell, for obvious reasons, does not do this extra checking.
 
 
3 hours later…
4:48 PM
@Kusalananda Yes. I was just surprised to see high level tools (editors) doing this, I'd assumed there was some issue lower down. But that makes perfect sense, thanks.
 

« first day (3270 days earlier)      last day (31 days later) »