I dual boot OpenBSD with Windows and have a third partition for data
which is mounted on /home. The data partition is FAT32 since that's
the only type that both OSes support well.

# fdisk wd0
Disk: wd0       geometry: 2432/255/63 [39070080 Sectors]
Offset: 0       Signature: 0xAA55
         Starting       Ending       LBA Info:
 #: id    C   H  S -    C   H  S [       start:      size   ]
------------------------------------------------------------------------
 0: 0B    1   0  1 -  636 254 63 [       16065:    10217340 ] Win95 FAT-32
*1: A6  637   0  1 - 1273 254 63 [    10233405:    10233405 ] OpenBSD
 2: 0C 1274   0  1 - 2430 254 63 [    20466810:    18587205 ] Win95 FAT32L
 3: 00    0   0  0 -    0   0  0 [           0:           0 ] unused

My problem, though, is with permissions. If I'm not logged in as root
I can't write on /home which kind of defeats the purpose of reserving
/home for user directories.

I read up on mount_msdos and saw that it gives all files on
filesystems mounted with it the permissions of how it was mounted,
which can be changed with the -u and -g options, so I tried
#mount_msdos -u kousu /dev/wd0h /home
#su kousu
$touch /home/kousu/test
and it works

However I would not like to restrict it to just one user, so I'd like
to mount it with the 'users' group and put all my user accounts in
there so they can edit their files (and other people's too, but that's
not much of an issue since this is just my own personal laptop).
Before trying to chgrp /home I just went on the fact that 'kousu' is
already in 'wheel' and mounted it, but then realized that /home
doesn't let the group write to it:

# ls -l / | grep home
drwxr-xr-x   1 root  wheel     8192 Dec 31  1979 home

I unmounted /home again and tried to change the permissions on it:
#chmod g+w /home
but it says "chmod: /home: is a directory". I don't understand this
error, if I do:
#mkdir /p
#chmod g+w /p
there is no problem.

So my two questions are:
1) how can I set the permissions on /home|why can't I set them?
2) how can I make it mount /home under a different user than root? I
don't see where I can pass options like that from fstab? Should I just
edit /etc/rc or whatever and find the mount section and add in my
explicit mount_msdos call?

It would be nice if I could make this work because this is a common
setup I make for most of my computers so that I can run OpenBSD
without getting people annoyed at me for being different (although KDE
makes it almost possible to finally kick windows forever).
Any pointers are greatly appreciated,
-Nick

Reply via email to