writer writing read-only
OS Ubuntu 20.04
Version: 6.4.6.2
Build ID: 1:6.4.6-0ubuntu0.20.04.1
CPU threads: 8; OS: Linux 5.8; UI render: default; VCL: gtk3;
Locale: en-US (en_CA.UTF-8); UI-Language: en-US
Calc: threaded
I set a file as read only using UNIX permissions.
When I open this read-only file in Writer, I can modify the document and save the changes without warning.
It hasn't always been this way. I have been warned about Read Only mode. When this happens I cannot put the cursor into writing mode. This is how it should be.
After some interesting comments I am adding some additional information :
Additional information
stephen@asus:~/winter-romance$ ll | grep 360.1
-r--r--r-- 1 stephen stephen 31K 2021-03-04 12:41 360.1.SnowStormOnTheMillerRoad.odt
stephen@asus:~/winter-romance$ sha1sum 360.1.SnowStormOnTheMillerRoad.odt
c2ec420ad587a27df0ce44c711d0642997d98511 360.1.SnowStormOnTheMillerRoad.odt
Note the file has no write permissions
I then load the file in Writer, make a change, and save the file.
stephen@asus:~/winter-romance$ ll 360.1.SnowStormOnTheMillerRoad.odt
-r--r--r-- 1 stephen stephen 31K 2021-03-04 12:41 360.1.SnowStormOnTheMillerRoad.odt
stephen@asus:~/winter-romance$ ll 360.1.SnowStormOnTheMillerRoad.odt
-r--r--r-- 1 stephen stephen 31K 2021-03-04 12:44 360.1.SnowStormOnTheMillerRoad.odt
stephen@asus:~/winter-romance$ sha1sum 360.1.SnowStormOnTheMillerRoad.odt
fe92a76f365f628dd7041932ebf5bf6a6e480903 360.1.SnowStormOnTheMillerRoad.odt
Note that the modified date on the file has changed and the checksum has changed, but the permissions are not changed.
I guess I don't understand permissions or I am setting them incorrectly. After years that comes as a surprise, but Linux can be a sly and subtle creature so...
I would very much appreciate be educated on this topic.
At a minimum, mention your OS name and LO version. Have you updated recently? How do you tell the document is read-only? OS permissions or LO warning?
@ajlittoz I have updated the question. Thank you.
„I set a file as read only using UNIX permissions.” If set to read-only on UNIX, no application will be able to write to the file. You can open such a file, you can change the content, but when you try to save you will always be informed that it is impossible.
@Astur I have updated the question with information that I hope will clarify the issue. Do you see where my understanding is incorrect.
Please tell us exactly how you set the file to be read-only. I did it in the following way: navigate to the folder holding the file with the Linux file manager. Right-click on the file, select Properties, select Permissions tab, set it to read-only for 1. myself, 2. everybody in the group with me and 3. everybody else. Close the dialog box (why can't you close it with OK when you change something important there?) After that I can't edit the file, or when I enable editing, can't save the file with the same name.
@Floris $
chmod -w <filename>
If you list your file in a terminal, what permissions does it show. For me, I see-r--r--r-- 1 stephen stephen 31K 2021-03-04 12:41 360.1.SnowStormOnTheMillerRoad.odt
Note that there is no 'w' in the permissions. With those permissions not even root can modify the file without forcing an override.Same as yours.
I would say, this is something very serious in your OS. By the way, what filesystem do you use? I'd suggest at least check the integrity of the filesystem. As not an expert in Linux, if I had such an issue, I'd personally just reformat and reinstall everything from scratch. I highly doubt it's a LibreOffice issue.
By the way, do other programs fail to write to those files? e.g., if you do things like
echo foo > filename
(using a copy of the file, of course, to not destroy your data)?@Mike Kaganski No other applications can modify the file. However I will take the issue to the Ubuntu forums. Thanks.