Opening msdos directories rw - BSD

This is a discussion on Opening msdos directories rw - BSD ; I have an msdos fat32 partition which I use for data shared by msdos, Linux and FreeBSD. I am able to mount it rw with a little script file - mount_msdosfs -m 777 /dev/ad0s2 /mnt/ad0s2 run, of course, by root ...

+ Reply to Thread
Results 1 to 6 of 6

Thread: Opening msdos directories rw

  1. Opening msdos directories rw

    I have an msdos fat32 partition which I use for data shared by msdos,
    Linux and FreeBSD. I am able to mount it rw with a little script file -

    mount_msdosfs -m 777 /dev/ad0s2 /mnt/ad0s2

    run, of course, by root

    I would much prefer to be able to incorporate this in the fstab file,
    but no wording I have tried seems to work.

    Can anyone show me the way?

  2. Re: Opening msdos directories rw

    John Richards wrote:
    > I would much prefer to be able to incorporate this in the fstab file,
    > but no wording I have tried seems to work.
    >
    > Can anyone show me the way?


    Have you read the msdosfs(5) man page?
    HTH
    --
    Torfinn Ingolfsen,
    Norway

  3. Re: Opening msdos directories rw

    Torfinn Ingolfsen wrote:
    > John Richards wrote:
    >> I would much prefer to be able to incorporate this in the fstab file,
    >> but no wording I have tried seems to work.
    >>
    >> Can anyone show me the way?

    >
    > Have you read the msdosfs(5) man page?
    > HTH

    I did indeed, but

    /dev/ad0s2 /mnt/ad0s2 msdosfs rw 0 0

    does not in fact make files rw, only ro. After that I need to run umount
    and then my script anyway to get rw.

    Any other suggestion?

  4. Re: Opening msdos directories rw

    In article John Richards
    writes:
    >Torfinn Ingolfsen wrote:
    >> John Richards wrote:
    >>> I would much prefer to be able to incorporate this in the fstab file,
    >>> but no wording I have tried seems to work.
    >>>
    >>> Can anyone show me the way?

    >>
    >> Have you read the msdosfs(5) man page?
    >> HTH

    >I did indeed, but
    >
    >/dev/ad0s2 /mnt/ad0s2 msdosfs rw 0 0
    >
    >does not in fact make files rw, only ro.


    They're presumably not read-only, but only the owner (in this case root)
    has write permission.

    > After that I need to run umount
    >and then my script anyway to get rw.


    And your script sets mode 777, i.e. read-write(-execute) for everyone,
    by means of the -m option... The mount_msdosfs(8) man page says:

    -m mask
    Specify the maximum file permissions for files in the file sys-
    tem. [...] The default mask is taken from
    the directory on which the file system is being mounted.

    I.e. try a chmod 777 /mnt/ad0s2 before doing the mount-via-fstab.

    --Per Hedeland
    per@hedeland.org

  5. Re: Opening msdos directories rw

    On 10:28 Sun 21 Jan , John Richards wrote:
    > Torfinn Ingolfsen wrote:
    > >John Richards wrote:
    > >>I would much prefer to be able to incorporate this in the fstab file, but no wording I have tried seems to work.
    > >>
    > >>Can anyone show me the way?

    > >Have you read the msdosfs(5) man page?
    > >HTH

    > I did indeed, but
    >
    > /dev/ad0s2 /mnt/ad0s2 msdosfs rw 0 0
    >
    > does not in fact make files rw, only ro. After that I need to run umount and then my script anyway to get rw.
    >
    > Any other suggestion?

    You can try with uid/gid options in fstab file:
    /dev/ad0s2 /mnt/ad0s2 msdosfs rw,-u=your_uid,-g=your_gid 0 0

    bye

  6. Re: Opening msdos directories rw

    nikilux wrote:

    > On 10:28 Sun 21 Jan , John Richards wrote:
    >> Torfinn Ingolfsen wrote:
    >> >John Richards wrote:
    >> >>I would much prefer to be able to incorporate this in the fstab file,
    >> >>but no wording I have tried seems to work.
    >> >>
    >> >>Can anyone show me the way?
    >> >Have you read the msdosfs(5) man page?
    >> >HTH

    >> I did indeed, but
    >>
    >> /dev/ad0s2 /mnt/ad0s2 msdosfs rw 0 0
    >>
    >> does not in fact make files rw, only ro. After that I need to run umount
    >> and then my script anyway to get rw.
    >>
    >> Any other suggestion?

    > You can try with uid/gid options in fstab file:
    > /dev/ad0s2 /mnt/ad0s2 msdosfs rw,-u=your_uid,-g=your_gid 0 0
    >
    > bye


    Also, keep in mind that the directory you mount to needs to be owned by the
    user/gid.

    -Jason


+ Reply to Thread