Announcement

Collapse
No announcement yet.

Can't edit file

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Can't edit file

    I want to edit the file /etc/network/interfaces
    This was originally a read only file, but I changed the permissions and now it shows that it's a read and write file for the user and group. However, when I edit the file in kate I get an error message when I try to save this edited file. It says I may not have permission or I lack disk space. Neither of these seems to be true.

    What do I need to do?

    Thank you.

    #2
    Re: Can't edit file

    First, change the permissions back to what it was - read only. You didn't (and don't) need to do this to edit a file that requires root permissions. All you need to do is to open it with Kate as 'root.' Simple enough to do. Open a konsole shell and type:
    Code:
    kdesu kate /etc/network/interfaces
    and enter. This will launch Kate with root permissions and allow you to edit and save the file.
    Windows no longer obstructs my view.
    Using Kubuntu Linux since March 23, 2007.
    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

    Comment


      #3
      Re: Can't edit file

      The reason it didn't work is because you don't belong to the user and group root. You would have to change permissions for other(the 3 rightmost positions).
      At any rate, as snowhog said that isn't the way to do it because you can mess something up changing file permissions and could weaken system security.
      It is best to temporarily access the file with root permissions as snowhog described.

      Comment


        #4
        Re: Can't edit file

        The command

        kdesu kate /etc/network/interfaces

        worked. Thank you.

        Question: Where can one find information about "kdesu" and other commands that aren't in many of the books on Linux? This is a common problem for me. When I have a problem and someone suggests a solution to me, invariably it involves commands that I have never seen before and can't find in my books.

        Comment


          #5
          Re: Can't edit file

          Type man:kdesu into the address bar of konqueror. This will work with any command or app with documentation.

          eriefisher
          ~$sudo make me a sandwich

          Comment


            #6
            Re: Can't edit file

            Thanks! I didn't know that I could get that sort of information from Knokueror.

            Comment


              #7
              Re: Can't edit file

              The linux man (manual pages) are accessible from the command line as well.
              For example you can type in a console window

              man kdesu
              or
              man ls
              or
              man cd
              and get info about these commands.
              The manual pages aren't going to give you detailed documentation about large graphical packages but they can be very useful for command line tools, command line options for tools etc.

              Comment

              Working...
              X