Results 1 to 3 of 3

Thread: Can't edit a file !?!?

  1. #1
    Join Date
    Mar 2006
    Beans
    1,441
    Distro
    Xubuntu 12.04 Precise Pangolin

    Can't edit a file !?!?

    I have a really strange problem. I am trying to edit a C++ source file, but gedit wont allow me to save changes to it. Gedit says:
    Code:
    A file with the same name already exists. Please use a different name.
    Right. Of course the file exists, I am trying to edit an existing file.

    About the same happens with kate... Kate opens the file in read-only mode.

    However, if I edit the same file with nano, editing and saving works. So the problem shouldn't be with access rights. Also "ls" shows rw rights to the file.

    What could be the problem? I can use nano, but I would need the syntax highlightind, and other features of a better editor.

    And whether I use sudo or not has no effect. The same happens with or without sudo, and I am the owner of the file.

    PS. luckily I am still dual booting with Hardy. I can always go back.

    Oh and this is a new installation of ubuntu 10.04
    Last edited by anaconda; May 7th, 2010 at 04:01 PM.
    _______________
    - anaconda

  2. #2
    Join Date
    Sep 2005
    Location
    Fargo, ND
    Beans
    134
    Distro
    Ubuntu

    Re: Can't edit a file !?!?

    You can run a "lsof" on the file; maybe some other process is locking it? Also, you could strace the editors to see what's going on when you try to save the file. Nano does offer syntax highlighting BTW, but nothing beats gedit in my book.

    Edit: Also, are you saving to a native filesystem (not NTFS or something funky, right?)

  3. #3
    Join Date
    Mar 2006
    Beans
    1,441
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: Can't edit a file !?!?

    Quote Originally Posted by sylvester_0 View Post
    You can run a "lsof" on the file; maybe some other process is locking it? Also, you could strace the editors to see what's going on when you try to save the file. Nano does offer syntax highlighting BTW, but nothing beats gedit in my book.

    Edit: Also, are you saving to a native filesystem (not NTFS or something funky, right?)
    Thanks for the reply.

    I think it is something funky..
    the file is on a cifs share in our server. Editing works with nano though, so it should work with others too.hmm.. syntax highlighting in nano. Interesting.

    I will check the lsof, when I boot to the 10.04 next time.

    The problem might be related to different character encodings?
    _______________
    - anaconda

Bookmarks

Posting Permissions

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