|
FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below. |
|
Thread Tools | Display Modes |
|
|
|||
Mounting USB as a normal user
http://www.freebsd.org/doc/en/books/...usb-disks.html
I followed the handbook to configure BDS to mount usb drives as a normal user. I'm able to do it just fine with root user. But some thing is wrong for normal user. user is of operator group. Here is what I see when FreeBSD boots up. Code:
/etc/rc: WARNING: devfs_set_ruleset: you must specify a ruleset number /etc/rc: WARNING: devfs_apply_ruleset: you must specify a ruleset Code:
[localrules=5] add path 'da*' mode 0660 group operator or Code:
devfs_system_ruleset="localrules" Here is what I see when I try to mount USB drive Code:
> mount -t msdosfs /dev/da4s1 /mnt/usb/ mount_msdosfs: /dev/da4s1: : Operation not permitted |
|
|||
I'm not a big fan of sudo.
|
|
|||
I don't know y? I guess because
1. I hate Ubuntu and I last used sudo in ubuntu. . 2. what I'm trying is from FreeBSD handbook and it is not working. |
|
|||
Quote:
OK what I need to do apart for installing sudo, also what is the difference between sudo and su? Asking because from what I remember from my Ubuntu experience we use sudo followed by some command and then we need to enter the password. If there is no escape from entering password then why not use "su". |
|
||||
Just curious, what is the permissions on /mnt/usb/?
__________________
My Journal Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''. |
|
||||
The thing is in different place....
/dev/daX are reated dynamically so simple /etc/devfs.conf rules won't apply to them. you need to fetch moment when /dev/daX is created and then change permissions for it, so user can access it (otherwise by default it's root/wheel).... That's the hard part.... that's why simply giving user permissions to write to /mnt/usb won't work. |
|
||||
@killasmurf86 I was operating under the assumption that the permissions for the device were already set by then, but hey... you know what they say about making assumptions :\
__________________
My Journal Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''. |
|
|||
Something is wrong with your devs.fs rule. Please post the complete /etc/devs.fs file.
Did you set vfs.usermount=1 as outlined by the FreeBSD handbook?
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump |
|
||||
Quote:
currently i ain't got /etc/devs.fs |
|
|||
Yes I did too. I've gone through 3 to 4 times to see if I'm missing something, but no luck.
Also /mnt/usb is owned by the user trying to mount the usb drive. If it can't be done like this then shouldn't they remove this topic from the handbook. |
|
||||
Quote:
For the 1st time, ever since i use FreeBSD i was able to mount drive as simple user without sudo Woooooooot [it took me 3-4 restarts this time] Thanks given out to rex for starting this and J65nko, for his useful (i mean it, if not you, i wouldn't bother again) post |
|
|||
Quote:
Quote:
Code:
REX# ls -l /dev/da* crw-r----- 1 root operator 0, 106 Oct 21 20:51 /dev/da0 crw-r----- 1 root operator 0, 107 Oct 21 20:51 /dev/da1 crw-r----- 1 root operator 0, 108 Oct 21 20:51 /dev/da2 crw-r----- 1 root operator 0, 109 Oct 21 20:51 /dev/da3 crw-r----- 1 root operator 0, 115 Oct 21 20:51 /dev/da4 crw-r----- 1 root operator 0, 116 Oct 21 20:51 /dev/da4s1 REX# Quote:
|
|
|||
Rex, you have to fix the/etc/rc: WARNING: devfs_set_ruleset: you must specify a ruleset number
/etc/rc: WARNING: devfs_apply_ruleset: you must specify a ruleset errors. Secondly: After you mounted the USD device, what is the output of ? Code:
# ls -l /dev/da*
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump |
|
||||
Quote:
it worked for me when i used [localrules=10] dunno, if tat is the case.... too bad, you need to create 1 folder per user that you want to be able to mount |
|
|||
I am the only user on my sytems, but I use a /home/j65nko/usb mount directory.
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump |
|
||||
Quote:
But with a little script you can fix that, can't you? EDIT: hmmm, i figured good thing, to try add relative path to fstab AND IT WORKED now i can mount ./usb EDIT2: I'm so happy EDIT3: hey, is there a way to make mount auto detect filesystem on usb stick? i'd really love to have auto in /etc/fstab Last edited by graudeejs; 21st October 2008 at 10:09 PM. |
Tags |
mount usb, usb, vfs.usermount |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
HOWTO: mounting an USB device as normal non-root user in OpenBSD | J65nko | Guides | 6 | 20th May 2017 12:03 PM |
How to Run K3B with normal user openBSD 4.4 | mfaridi | OpenBSD General | 6 | 12th November 2008 10:25 PM |
Wireshark not run in normal user | mfaridi | FreeBSD Ports and Packages | 2 | 7th November 2008 09:49 PM |
Mounting samba share as normal user | rex | FreeBSD General | 4 | 27th October 2008 05:17 PM |
command launched by normal user... | maurobottone | OpenBSD General | 4 | 1st June 2008 03:45 AM |