Wednesday, May 15, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 2439  / 1 Year ago, fri, december 2, 2022, 12:33:39

I just set a read only permission to a file using chmod 400 filename.txt after that I open the file via vi editor and edit and try to save using :w then is says E45: 'readonly' option is set (add ! to override) so I use :w!. Then it save the edited file with read only permission? How can it be possible?



Are there any differences between Ubuntu and Fedora that affect access permissions?


More From » permissions

 Answers
6

If the file belongs to you, you can always change permissions on the file by calling chmod. I guess editor just alters permissions implicit, saves and reverts permissions. To really forbid writing, you should change file owner too.


[#23742] Friday, December 2, 2022, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
saucdisr

Total Points: 4
Total Questions: 102
Total Answers: 117

Location: Ecuador
Member since Thu, Jun 4, 2020
4 Years ago
saucdisr questions
Tue, May 10, 22, 00:19, 2 Years ago
Fri, Mar 4, 22, 17:31, 2 Years ago
Mon, Jul 4, 22, 13:04, 2 Years ago
Sat, May 28, 22, 08:41, 2 Years ago
;