LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   *BSD (https://www.linuxquestions.org/questions/%2Absd-17/)
-   -   FreeBSD+fstab+fat partition (https://www.linuxquestions.org/questions/%2Absd-17/freebsd-fstab-fat-partition-215455/)

krajzega 08-09-2004 02:15 PM

FreeBSD+fstab+fat partition
 
I've got FreeBSD 5.1 and one FAT partition. I would like to mount it and allow normal user to write and delete files there. I know that FAT doesnt support permissions such as UFS or EXT*. My previous system was Slack 9.1 and there i had to add one line to fstab including there "user" argument. So how to make the same with *BSD ? Let's see my /etc/fstab :

[krajzega][krajzega@FreeBSD]# cat /etc/fstab | grep ad1s1
/dev/ad1s1 /d msdos rw,user 1 1

And another question: does something like mkfs ufs exists on BSD? Where could I find it?

frob23 08-09-2004 02:32 PM

mkfs has been replaced with the newfs utility.

As for the FAT partition:
man mount_msdosfs

Pay special attention to the -m mask option. Hint:
/dev/ad1s1 /d msdos rw,-m=777 0 0

I am not sure of what the "user" option did for you in Linux. If you would tell me there probably is something similar. You don't want to dump or check this partition so keep the last two numbers as 0s.

This line will mount it so that every file is readable, writable, and executatable by everyone on the system. Very good security I assure you. ;)

krajzega 08-09-2004 02:40 PM

But what to do, when I've some data on that partition and I dont want to lose it!?

frob23 08-09-2004 02:53 PM

/dev/ad1s1 /d msdos rw,-u=1000 0 0

Replace 1000 with the UID of the user who need the permission to write the drive. If you want a bunch of people to be able to write the partition create a group for them then use:

/dev/ad1s1 /d msdos rw,-g=3000,-m775 0 0

Replace 3000 with the number of the group of people who can write to the drive, and add all the users who need that permissions to that group. The man page covers all this and is worth the read.

krajzega 08-09-2004 03:05 PM

Big thanks!
And another problem: how to resize existing partition without loosing data?


All times are GMT -5. The time now is 05:15 PM.