Hello,
I have a desktop installation of FreeBSD 7, and that's why I need my regular user to have write access to some mounted filesystems. How can I mount these filesystems? I can't see an option to mount giving user ownership rights.
I tried with
sysctl -w vfs.usermount=1
then change ownership of /mnt directory:
chown ivanatora:ivanatora /mnt/*
and then issue mount /mnt/storage/ with user ivanatora, and I got:
chown: storage: Invalid argument
Wtf? What does 'Invalid argument' means? Never seen that for chown.
Anyway I tried chowning a different directory with success, and I can mount it with my user.
The question is how would it be mounted after a reboot? I don't want to remount these everytime the system starts. There must be a fstab option to set the uid of that mount, maybe?

After a reboot they are mounted with root privilegies - i.e. no other user than root can write on them. I can write there with a regular user only after remounting these with that user.
And a one more point on ext2/3 partitions - they are mounted with preserved modes of ownership. I.e. if /mnt/linux/home/user1 is owned by user1 on the Linux filesystem (uid 1500 for example), after mount in FreeBSD the file owner is uuid 1500, which I doesn't have on my system. Can I just ignore these ownerships and make one single user owner of the whole mounted filesystem? And how to keep that after a reboot? Man page of mount didn't have a clue about setting uuid of the mount point.

there are two different ways to control ownership of ntfs and msdosfs filesystems. The hard way is to specify the user and group when mounting the filesystem - use the -u and -g options: check man mount_msdosfs(8)
The easy way, and better, is to set the user, group and permissions of the mount point. Unmount the filesystem, set the mount point's owner and permissions, and remount the filesystem. All files in the filesystem will now have the same permissions as the mount point. (executable permissions excetped: -x on directories will be carried over, but will be cleared on regular files)
I do not know of any way to remap these uids when mounting filesystems. It is an option you can specify when exporting a filesystem over NFS. (which, of course, is no help whatsoever!) Man pages did not help me either, there.

__________________The only dumb question is a question not asked.
The only dumb answer is an answer not given.

Have a look at the output of #dmesg to see extra error messages and information.

Note also that FreeBSD only has read-only support for most of the Linux filesystems (XFS, ReiserFS, JFS, etc). There's only read-write support for ext2. The "read-only filesystem" error is mount telling you that you really should add -r to the mount command for these filesystems. It added this for you, output the error, then mounted the fs read-only.

NOTE: This is sorta *not so secure* permission set. It would be better to use 660 permissions and add your group to the group owner of the /dev/ad*
4) Added these filesystems to /etc/fstab so they will be automatically mounted after next reboot:

how are you able to write with the ntfs filesystem? i was under the impression that the freebsd mount_ntfs program has no write support and to write to an ntfs filesystem u needed to use the ntfs-3g program provided by the fuse-ntfs package/

how are you able to write with the ntfs filesystem? i was under the impression that the freebsd mount_ntfs program has no write support and to write to an ntfs filesystem u needed to use the ntfs-3g program provided by the fuse-ntfs package/

You _can_ tell freebsd to mount ntfs read-write: but that is like saying that you can bungee jump using dental floss as a rope.

It will cause strange behavior and filesystem corruption.

You are correct - and it is a pity that someone (me included) didn't tweak to that one sooner - he should be using fuse-ntfs.

__________________The only dumb question is a question not asked.
The only dumb answer is an answer not given.

Yes, now I'm using the ntfs-3g driver.
Here is how I did it (as long as I remember):
1) Install package fusefs-ntfs
2) Add to rc.conf:

Code:

fusefs_enable="YES"

AND/OR do it on the fly:

Code:

/usr/local/etc/rc.d/fusefs start

3) Using ntfs-3g you can mount filesystems only with the mount_ntfs-3g command, which appears to not be working with fstab. That's why a little patch must be applied to the mount program. Here is the patch.
4) Change NTFS entries in /etc/fstab from ntfs to ntfs-3g, like that: