DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 20th January 2015
sw2wolf sw2wolf is offline
λ programmer
 
Join Date: Mar 2012
Location: China
Posts: 133
Default Can FAT32 be readed/written by ordinary user ?

After
Code:
#mount_msdos /dev/wd0j /mnt/D
, only root can write to /mnt/D.

Sincerely!
Reply With Quote
  #2   (View Single Post)  
Old 20th January 2015
albator albator is offline
Shell Scout
 
Join Date: Jul 2011
Posts: 98
Default

You can either mount this drive on a directory on which this user has write access or use:
Code:
mount_msdos -u uid
Extract of mount_msdos(8) man page :
-u uid
Set the owner of the files in the file system to uid. The default owner is the owner of the directory on which the file system is being mounted.
Reply With Quote
  #3   (View Single Post)  
Old 20th January 2015
sw2wolf sw2wolf is offline
λ programmer
 
Join Date: Mar 2012
Location: China
Posts: 133
Default

Quote:
Originally Posted by albator View Post
You can either mount this drive on a directory on which this user has write access or use:
Code:
mount_msdos -u uid
Extract of mount_msdos(8) man page :
-u uid
Set the owner of the files in the file system to uid. The default owner is the owner of the directory on which the file system is being mounted.
thanks for your quick response! The "-u" option is the key.
Code:
$grep msdos /etc/fstab 
69810aeb7e589d07.j /mnt/D msdos rw,nodev,nosuid,-u=sw2wolf 1 2
It works like a charm.
Reply With Quote
  #4   (View Single Post)  
Old 20th January 2015
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,131
Default

Because 99% of the tutorials on the internet use /mnt, it does not mean you have to use that

Usually I mount USB gear on a directory U in my home:
Code:
$ sudo mount /dev/sd0i U
$ mount
/dev/wd0a on / type ffs (local)
/dev/sd0i on /home/adriaan/U type msdos (local, uid=1001, gid=1001)
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
  #5   (View Single Post)  
Old 22nd January 2015
sw2wolf sw2wolf is offline
λ programmer
 
Join Date: Mar 2012
Location: China
Posts: 133
Default

Quote:
Originally Posted by J65nko View Post
Because 99% of the tutorials on the internet use /mnt, it does not mean you have to use that

Usually I mount USB gear on a directory U in my home:
Code:
$ sudo mount /dev/sd0i U
$ mount
/dev/wd0a on / type ffs (local)
/dev/sd0i on /home/adriaan/U type msdos (local, uid=1001, gid=1001)
What you suggested is very convenient, thanks!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
IPV6 addresses how are they written? comet--berkeley OpenBSD General 5 7th May 2013 04:44 PM
Can FAT32 partition be writable by ordinary user ? sw2wolf OpenBSD General 5 24th March 2012 03:15 PM
create a FAT32 partition and format it. wesley OpenBSD General 2 6th November 2010 08:31 AM
75% of Linux code now written by paid developers J65nko News 4 22nd January 2010 03:42 AM
Formatting fat32 drive quickly map7 FreeBSD General 10 26th July 2008 05:17 PM


All times are GMT. The time now is 08:30 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick