On 25/11/2018 06:00, Daniel Kian Mc Kiernan (the best Daniel of the
bunch) wrote:
On 11/24/18 7:11 PM, Richard Kimberly Heck wrote:
On 11/24/18 6:33 PM, Daniel Kian Mc Kiernan wrote:
On 11/24/18 1:05 PM, paolo m. wrote:
As i change a lyx file name (say test1.lyx ) with a new name (say
test2.lyx) , by the command 'file -> save as', the new file created has
the usual access mode, but, when saved, its mode change so that is
inaccessible to groups and to the world.
That does not happen when test1.lyx is opened by a text editor, e.g.
kate, then saved with a new name (say test3.lyx)
Here is the result:
% ll *lyx
pol pol test3.lyx 1745 21:54 -rw-rw-r--
pol pol test2.lyx 1746 21:53 -rw-------
pol pol test1.lyx 1745 21:52 -rw-rw-r--
Any ideas?
Curious, I checked my own .lyx files, and found that most were 600,
many were 644, and some were 664. There was no clear relationship
between dates and permissions, and at least two files with the same
date had different permissions.
I blame global warming.
I do not believe LyX sets file permissions itself. The write routine
simply uses basic_ofstream, which just creates the file using the
current umask, or whatever other default permissions are in place.
Well, all of my LyX files were created with LyX or with cp, and I've not
run chmod on them. I've never played with my configuration to change
the default permissions. And, as I said, there was no clear
relationship between dates and permissions, which would be expected if
defaults changed with updates to my OS.
I could be very mistaken, but I'm inclined to think both that LyX has at
times selected permissions, and that it has selected differently for
“Save As…” from what it has selected for “Save”.
There is no practical problem for me here, and a practical problem could
be addressed by chmod. But the situation is puzzling.
On macos when creating a new file with LyX (no difference between 2.3
and 2.4) and on the first save the permissions are as defined by the
umask (usually -rw-r--r--). However on the next save the g and w
permissions are cleared, turning them into (-rw------).
Looking at all my .lyx files most of the older ones have the permissions
(-rw-r--r--) and most of the younger ones the permissions (-rw------)
with the break occurring somewhere in sept 2014.
This may be a coincidence, but it could also mean that this strange
behavior started around that time.