Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

If a file is read-only, LibreOffice Writer will open it in read-only mode and will allow printing. (Alas, it will also allow "save as...".) I suspect similar results could be achieved by using permissions of the operating system to give the public only read permissions to the file (and still allow the owner of the file to update as needed).

Where I last worked one of my tasks was to maintain a document tree for our internal users and we made good use of permissions that allowed just a few of us to edit the directory tree holding the documents and giving read-only access to the staff and read, execute access to the directories themselves, but no write (create) privilege to the staff so people couldn't accidentally create files or subdirectories in the documentation tree. (I also had a local disc where I would construct the tree and then in off-hours use fastcopy to propagate the changes to the server; fastcopy being the tool I used because it had an option to copy or delete files to make the destination tree look like the source tree without having to copy unchanged files.)

I also noticed that there is a --view {filename} command-line parameter for LibreOffice that can be used for launching LibreOffice and opening the file in read-only mode. This might be an option if the public user sees shortcuts to launch LibreOffice to view the files instead of allowing the public user to actually click (or type in) the name of the file.

If you don't mind the extra work and the extra disk space, another option is to keep the LibreOffice documents in a private directory and use LibreOffice or other products to export those files to PDF, and make those PDF files available for the public to view & print. The "File" | "Export as PDF..." dialog in LibreOffice Writer includes a "Security" tab where you can give a password and prevent editing of the PDF file but allow printing (you can turn off printing, too). However, even so, in a public-facing computer I would still favor giving the public read-only access to the files and (if needed) read, execute (browse) access to the directory(ies) where the public-facing PDF files are located. Also, by giving the users access to a PDF viewer with the files instead of to command-line-driven LibreOffice, you don't have to worry about a member of the public doing something that would mess up the LibreOffice profile for the rest of the public.

The community college used Deep Freeze on its lab computers and it would restore the computers to the last "frozen" state when a person logged off so that any changes a person made to that computer would be automatically undone upon logoff. It saved a lot of headaches that could be caused by "creative" students, but it also added a burden of "unfreezing" PCs, get all the approved updates that accumulated, making sure the automatic updates were turned off, and then "refreezing" the machines.