Sublime Forum

Sublime v3: CIFS/NFS permissions get botched

#1

I have a funky setup where I edit files from Windows (through CIFS) and then compile on Linux (through NFS). Sublime v3 somehow sets the eXecutible bit on text files whenever I save:

$ ll mgmt/dc/iscsi_*
-rwxr-xr-x 1 os users 7.4K Apr 26 15:53 mgmt/dc/iscsi_digest_actions.cc*
-rw-r–r-- 1 os users 2.7K Apr 22 19:13 mgmt/dc/iscsi_digest_actions.h

This generates a bit of a mess as permissions get into Git. This looks like a regression (feature?) in v3. Is there a workaround? Can someone confirm please?

Thanks!

0 Likes

#2

Specifically, this occurs on v3 Dev builds. I am running 3030 right now.

0 Likes

#3

Strange. Can you confirm whether this issue occurs now in ST2. I suspect this may be something to do with a change in your Linux server’s config that may have been brought about through, for example, updates.

The reason for this is that CIFS/windows file sharing (at least without leveraging AD support AFAIK) doesn’t expose Linux permissions, nor obeys them for inbound operations. So even if Sublime were setting these flags they would be ignored by the CIFS server. More likely the CIFS configuration has changed, since there are masks you can specify in samba.conf that determine the various chmod and chown settings for files created/manipulated through CIFS.

I could be missing something, but I’d look into this as a starting point; meantime it would be useful to confirm whether your current server config responds to ST2 in the same way as ST3.

0 Likes

#4

I’ve just done the following test:

  • open a file, add a space, save
  • git status (to observe the change via NFS)
  • remove the space, save
  • git status
  1. st 2.0.1: OK
  2. EmEditor 10: OK
  3. st 3/Dev: BUG

I get the following after doing 3):

$ git diff
diff --git a/rdisk/test/conf_test1.cc b/rdisk/test/conf_test1.cc
old mode 100644
new mode 100755

So, the bizarre side-effect appears to be limited to ST3/Dev.

P.S. the data is hosted on a NetApp appliance which speaks both CIFS and NFS.

0 Likes

#5

This will be an artifact of using atomic saves in S3. You can disable this with the atomic_save setting.

0 Likes

#6

Yep, setting "atomic_save": false solved the issue. Thank you!

0 Likes