#1266 editing a file on a linux SAMBA server

Bug
open
SciTE (627)
2
2011-12-21
2011-12-17
ipnoz
No

Hi, I've got 2 issues when I edit a file localized on a SAMBA server.

First, when I'm on windows 7 and I save a modified file with CTRL+S, it's modify the unix permission of the file in the server.
I don't know how scite file edition works, but after some reshearch, it's probably because the file has been replaced by a new one.
This issue is reported for other software like MSwords.
If I edit the same file with the notepade of MS, the file permissions are preserved.

The second issue is only when I'm on gnome ( debian lenny and squeeze installation, I never tryed with KDE or other DM ).
Everytime I edit and save a file in a SAMBA server, when I lose scite focus for another program then I get back to scite, scite popup the "do you want to reload modified file" message.
I'm sur the file haven't been modified by another program, and it's always append after I modify and save a file.
I know I can set are.you.sure.on.reload=0, but I prefert to be informed on real modification.

Regards

Discussion

  • Neil Hodgson

    Neil Hodgson - 2011-12-18
    • assigned_to: nobody --> nyamatongwe
    • milestone: --> Bug
    • labels: --> SciTE
     
  • Neil Hodgson

    Neil Hodgson - 2011-12-18

    You haven't said which version you are running.

    SciTE doesn't normally save files by replacing them. Instead it opens the file and changes the contents. It does this to avoid the first problem mentioned. This may be changed with save.deletes.first.

     
  • ipnoz

    ipnoz - 2011-12-18

    Sorry for that

    I've tested the first issue with scite 3.02
    I tryed save.deletes.first=0 but it doesn't help.
    I'm searching now how to disallow SAMBA to change file permission, but I found nothing for the moment.

    The second issue, I've tested with linux scite 2.27 and 3.02.

     
  • Neil Hodgson

    Neil Hodgson - 2011-12-19

    I set up Samba sharing from a Mac running OS X 10.5.8. Opened a file with permissions -rw-r--r--. Then from the OS X shell changed the permissions to -rw-r----- (turned off read for others). Saved from SciTE on Windows 7. File still has permissions -rw-r----- and contents have changed. So SciTE is not changing permissions in this case.

    With save.deletes.first=1, the permissions are changed (to -rw-r--r--) showing that SciTE really is saving in-place by default. Your particular Samba set up may be behaving differently but I don't know much about Samba so can't really help with its configuration.

     
  • Neil Hodgson

    Neil Hodgson - 2011-12-19

    With the same OS X Samba server and a current Ubuntu 11.10 client, I can't reproduce the repeated "do you want to reload" message. If the file is modified on the client, then the server focus is shifted off and back onto SciTE on the client then there will be a single "do you want to reload" message. Perhaps the permissions are set up for you such that SciTE can not retrieve the modified time stamp correctly.

     
  • ipnoz

    ipnoz - 2011-12-20

    For the second issue, I'm pretty sur this not come from SAMBA server configuration, because if I edit the same file, on the same SAMBA server, but with a windows7 client, it's works well.

    It's probably an issue with nautilus, as I open the file with it. I will make a try with Kate or the gnome file editor when I will be on my linux system.
    I can remember that I couln't open file on a SAMBA server with scite and nautilus on a lenny installation.

    For the first issue, my problem was for the user exec bit:
    -rwxr-x--
    after a save, it become
    -rw-r-x--
    It's a bit boring when you are editing shell scripts ^^.

    I found an ugly workaround in the SAMBA configuration.

    It's probably because scite update the permissions to the file, and SAMBA by default, do not permit to add the exec bit.

     
  • Neil Hodgson

    Neil Hodgson - 2011-12-21
    • priority: 5 --> 2
     
  • Neil Hodgson

    Neil Hodgson - 2011-12-21

    Unless there is something that can be done in SciTE to help here, I won't be working on this further.

     
    • surfzoid

      surfzoid - 2014-11-15

      Right, in the past i had the same problem, it came from Gnome/Mate setting, they disallow exec of an text file by default

       

Log in to post a comment.