I believe the preferred approach is to set ownership and/or file/directory masks in fstab. I don't think you ever want to be changing modes in /dev/*? Its contents are virtual and auto-generated anyway, so naturally manual changes to them will be overwritten over time.
Code:
# <file system> <mount point> <type> <options> <dump> <pass>
/dev/sda2 /main ntfs defaults,nls=utf8,dmask=002,fmask=113,gid=1000 0 2
Owned by root (default) and my group (gid 1000), octal directory mask 002 = chmod 0775 (executable to allow for entering directories), octal file mask 113 = chmod 0664 (not executable), UTF-8 encoding. Octal modes are just like normal modes, but inverted.
Code:
$ ls -ld /main
drwxrwxr-x 1 root sunspire 8192 2009-08-02 04:28 /main
$ stat /main/WINDOWS # directory
File: `/main/WINDOWS'
Size: 61440 Blocks: 120 IO Block: 4096 directory
Device: 802h/2050d Inode: 831 Links: 1
Access: (0775/drwxrwxr-x) Uid: ( 0/ root) Gid: ( 1000/sunspire)
Access: 2009-08-01 23:18:18.000000000 +0200
Modify: 2009-08-01 22:11:12.000000000 +0200
Change: 2009-08-01 22:11:12.000000000 +0200
$ stat /main/ntldr # file
File: `/main/ntldr'
Size: 250048 Blocks: 496 IO Block: 4096 regular file
Device: 802h/2050d Inode: 1294 Links: 1
Access: (0664/-rw-rw-r--) Uid: ( 0/ root) Gid: ( 1000/sunspire)
Access: 2008-09-18 14:25:59.000000000 +0200
Modify: 2008-04-14 14:00:00.000000000 +0200
Change: 2008-08-13 02:55:21.000000000 +0200
edit: check man page for mount and mount.ext3 (etc) to see what fs-specific options are available.
Bookmarks