Configure TextPad and Samba

Instructional HowTos, posted by users. No questions here please.

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
bldrdash
Posts: 1
Joined: Wed Jun 09, 2004 4:21 pm

Configure TextPad and Samba

Post by bldrdash »

If you've ever been frustrated with file permissions being reset when editing a file, here are a few tips that may help.

- You must enable "Overwrite original files directly.." from Configure | Prefs | File. To verify for yourself TextPad is doing what it's supposed to, perform the following tests on your *nix system.
  • Create a simple text file. Set the permissions how you like.
    Type 'ls -li filename' and note the inode number (first column)
    Edit the file in TextPad, save changes
    Type 'ls -li filename' and see if the inode number is the same.
If your inode number is the same, it means TextPad is indeed overwriting the file like it supposed to. You can perform the same test wth "Overwrite original files directly.." off and see how the inode changes.

- TextPad is only 1/2 the story: if you find your permissions are still being modified when you edit the file you'll need to make some changes on the samba side.
  • Edit your smb.conf file and add the following to the global section:

    Code: Select all

    [global]
    map archive = no
    map hidden = no
    map system = no
    
    Restart samba
Now edit some files and see if the permissions change. If they are still changing, investigate the "nt acl" option in smb.conf. As long as TextPad is not changing the inode, any problems you may be having with permissions has to do with Samba configuration.

To get more information on the "map XXX" commands in samba, type 'man smb.conf' on your *nix system. If you don't have the "map" options, upgrade your version of samba.

These tests were done with Samba 2.2.8.
Post Reply