Other mount and ntfs-3g: permissions and charset changed

Hello Guys !

Case 1:
Code:
root@maja:/# ls -l
.....
drw-r--r--   2 root   wheel    512 ..... mnt
.....
root@maja:/# ntfs-3g -o ro,noatime,noauto  /dev/ada1p1  /mnt
root@maja:/#
root@maja:/# ls -l
.....
drwxrwxrwx   2 root   wheel    512 ..... mnt
......
root@maja:/#
root@maja:/# umount /mnt
root@maja:/# ls -l
.....
drw-r--r--   2 root   wheel    512 ..... mnt
.....

Question: why after ntfs-3g(8) the permissions of /mnt changed ? This happen in any case, with or without the -o ro option.
What is means ? Is it maybe a bug ? or a bad setting of the terminal character set ?
This doesn't happen if I mount FATxx filesystems with the mount(8) command.


Case 2:
After mounting a FAT16 drive, the names of the files are not perfectly reproduced; in particular letters like "ò" are changed with "?", and so on.
I've tryed with the option 'longnames':

#mount -t msdosfs -ro,longnames /dev/da1s1 /mnt

but it doesn't work.

The same charset problem with ntfs-3g, also if I've added the option 'windows_names':

#ntfs-3g -ro,noatime,noauto,windows_names /dev/da1s1 /mnt


Any tip is appreciated.

Bye.
 
Question: why after ntfs-3g(8) the permissions of /mnt changed ? This happen in any case, with or without the -o ro option.
What is means ? Is it maybe a bug ? or a bad setting of the terminal character set ?
A legit question I think, many people get confused over that. The answer is two fold.

First: NTFS doesn't support the Unix-like permission scheme. As such a general default is used and you see the result of that above. If you check the manualpage which you quoted you'd see commandline options such as umask and userid which can be used to change this default.

Second: Once you mount a filesystem somewhere then the mountpoint will obtain the permission scheme of said filesystem. It's easy to overlook this but any filesystem can have permissions of its own, even the root filesystem:
Code:
root@unicron:/ # ls -ld .
drwxr-xr-x  20 root  wheel  26 Mar 25 09:36 ./
So to demonstrate this behavior....
Code:
root@unicron:/ # ls -ld /home/peter/temp
drwxr-xr-x  7 peter  peter  10 Mar 25 13:55 /home/peter/temp/
root@unicron:/ # ls -ld /opt
drwxr-xr-x  11 root  wheel  11 Mar  3 20:38 /opt/
root@unicron:/ # mount -t nullfs /opt /home/peter/temp
root@unicron:/ # ls -ld /home/peter/temp
drwxr-xr-x  11 root  wheel  11 Mar  3 20:38 /home/peter/temp/
As you can see the permissions changed to reflect on the permissions of /opt. That's the same thing you see happening on your end.

This doesn't happen if I mount FATxx filesystems with the mount(8) command.
Actually it does. Because by default /mnt has a permission set of 755, not 644 which you shared. The mountpoint took over the permission set of the filesystem.
 
First: NTFS doesn't support the Unix-like permission scheme. As such a general default is used and you see the result of that above. If you check the manualpage which you quoted you'd see commandline options such as umask and userid which can be used to change this default.

Yes ShelL, I'm agree with you, and infact I've already read the manpage of ntfs-3g(8) . But the use of umask and userid to change this defaults results in a very tedious redundancy.

Thanks for the Second point clarified by you.
 
Regarding question-marks in file names do try -L switch of mount_msdosfs(8). Also check if your terminal can output accented characters.

It works !!! -L is the correct option to use.
To check if terminal can output accented characters is necessary that the character set it_CH.UTF-8 was previously declared in .cshrc.

Thanks very much.
 
Back
Top