Results 1 to 4 of 4

Thread: In Kate/Kwrite, is there a way to save a read-only file?

  1. #1

    Default In Kate/Kwrite, is there a way to save a read-only file?

    In various applications, such as vi and various IDEs, there is a way to save a modified read-only file, if the user has ownership of the file. Is there a way to do so in Kate/Kwrite, without having to go to a shell and doing a chmod +w? It's not a big deal one time, but when editing multiple files, it becomes a pain.

  2. #2
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,360
    Blog Entries
    3

    Default Re: In Kate/Kwrite, is there a way to save a read-only file?

    Quote Originally Posted by sadastronaut View Post
    In various applications, such as vi and various IDEs, there is a way to save a modified read-only file, if the user has ownership of the file. Is there a way to do so in Kate/Kwrite, without having to go to a shell and doing a chmod +w? It's not a big deal one time, but when editing multiple files, it becomes a pain.
    At least in "kwrite", the File menu includes "Save as" which allows saving the file under a different name or path.
    openSUSE Leap 15.1; KDE Plasma 5;

  3. #3
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    24,863

    Default Re: In Kate/Kwrite, is there a way to save a read-only file?

    Quote Originally Posted by sadastronaut View Post
    .... if the user has ownership of the file....
    That is not true. It is possible when you have the right to write into the directory that holds the file.

    While in the majority of cases the owner of the file will be the owner of the directory and also the write permission for the owner of the directory will be set, that is not per se the case.
    Henk van Velden

  4. #4
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    24,863

    Default Re: In Kate/Kwrite, is there a way to save a read-only file?

    Quote Originally Posted by hcvv View Post
    That is not true. It is possible when you have the right to write into the directory that holds the file.

    While in the majority of cases the owner of the file will be the owner of the directory and also the write permission for the owner of the directory will be set, that is not per se the case.
    I have to correct myself.

    It is not crucial to have write permission to the directory, but to have x permission. That will allow you to do the needed chmods (either by typing then in a shell, or through a vi feature). You need access to the inode, which is what the x-bit governs.

    Sorry for the confusion I may have created
    Henk van Velden

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •