octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #53515] Running Octave GUI as "sudo" creates a


From: Dan Sebald
Subject: [Octave-bug-tracker] [bug #53515] Running Octave GUI as "sudo" creates a settings file owned by root
Date: Thu, 29 Mar 2018 15:02:51 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0

Follow-up Comment #3, bug #53515 (project octave):

Because Octave is run as root doesn't necessarily mean it has to save a file
with root ownership.  As an example, here vi doesn't change the ownership of
the file:


address@hidden ~/octave/bug/53006 $ cat test.txt
cat: test.txt: No such file or directory
address@hidden ~/octave/bug/53006 $ vi test.txt
address@hidden ~/octave/bug/53006 $ cat test.txt
This is
address@hidden ~/octave/bug/53006 $ ls -l test.txt
-rw-rw-r-- 1 sebald sebald 8 Mar 29 13:53 test.txt
address@hidden ~/octave/bug/53006 $ sudo vi test.txt
address@hidden ~/octave/bug/53006 $ cat test.txt
This is some text.
address@hidden ~/octave/bug/53006 $ ls -l test.txt
-rw-rw-r-- 1 sebald sebald 19 Mar 29 13:54 test.txt
address@hidden ~/octave/bug/53006 $ 


Yes, if no such file exists, it is different:


address@hidden ~/octave/bug/53006 $ sudo vi test2.txt
address@hidden ~/octave/bug/53006 $ cat test2.txt
This is a new file.
address@hidden ~/octave/bug/53006 $ ls -l test2.txt
-rw-r--r-- 1 root root 20 Mar 29 13:57 test2.txt


I suppose that creating a new qt-settings file with an ownership other than
root would be a security risk, but if the file already exists with a certain
ownership, why change it?

Nonetheless, I don't think having a non-writable qt-settings should make
Octave inoperable.  Just when and how qt-settings should be written (i.e.,
write everytime someone repositions the window layouts so that if Octave
crashes, the most recent layout is retained?) could be done better.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?53515>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]