Usb drive mount by a normal user

how can i make a normal user mount usb drives? i added a line in fstab that allows users to mount /dev/sdb1, but this solves only partially the problem

After a recent sys upgrade, I am having a somewhat similar problem.  I can still mount my usb stick, but the permissions are now a little screwy (EDIT: i.e. permission denied when trying to change into /mnt/usb directory).
fstab entry:
/dev/sdc1 /mnt/usb vfat rw,user,noauto 0 0
after performing a mount /mnt/usb the permissions on /mnt are:
d-wxrw-rwx 6 root users 16384 1969-12-31 19:00 usb
well, the permissions on this drive seem strange to me, as well as the 1969 date.  Additionally if I look at the directory as root everything is executable, which should not be the case.  I've added my username to users and storage in /etc/groups to no effect.  I can mount fine using pmount, but I would much prefer things my way, plus i dislike the idea of being forced to mount things under /media (notions of liberty and such)
Any thoughts or additional info needed?  I've become stumped enough by this odd behavior to actually register and post.
Last edited by tousborne (2007-12-01 17:42:08)

Similar Messages

  • All USB drives mount as read only for user

    I have searched a bunch and thee results I find seem to be irrelevant to my situation. Most relate to a single USB media that is a problem and won't read or write.
    On a new Arch install on a new computer (my third base system install). Running Gnome.
    All USB mass storage devices mount as read only for the logged in user. Root has write permissions and I can mkdir no problem. It is not an issue with the USB drive itself as this occurs with multiple USB media (I've tested several SD cards on a reader and at least two drives, all the media works correctly on my existing installations)
    I'm posting the contents of my /etc/group file in case there's an obvious error there I don't see, and my dmesg output upon plugging in the drive. User name is changed in the group file posted to "archie"
    This is a single-user system.
    /ect/group
    root:x:0:root
    bin:x:1:root,bin,daemon
    daemon:x:2:root,bin,daemon
    sys:x:3:root,bin
    adm:x:4:root,daemon
    tty:x:5:
    disk:x:6:root
    lp:x:7:daemon
    mem:x:8:
    kmem:x:9:
    wheel:x:10:root,archie
    ftp:x:11:
    mail:x:12:
    uucp:x:14:archie
    log:x:19:root
    utmp:x:20:
    locate:x:21:
    rfkill:x:24:
    smmsp:x:25:
    http:x:33:
    games:x:50:
    lock:x:54:
    uuidd:x:68:
    dbus:x:81:
    network:x:90:
    video:x:91:
    audio:x:92:
    optical:x:93:
    floppy:x:94:
    storage:x:95:
    scanner:x:96:
    power:x:98:
    nobody:x:99:
    users:x:100:archie
    systemd-journal:x:190:
    archie:x:1000:
    avahi:x:84:
    polkitd:x:102:
    rtkit:x:133:
    gdm:x:120:
    brlapi:x:999:
    kvm:x:78:
    ntp:x:87:archie
    dmesg output
    [ 968.044188] usb 4-3: new high-speed USB device number 4 using ehci-pci
    [ 968.170628] usb-storage 4-3:1.0: USB Mass Storage device detected
    [ 968.171435] scsi7 : usb-storage 4-3:1.0
    [ 969.174450] scsi 7:0:0:0: Direct-Access Generic USB SD Reader 1.00 PQ: 0 ANSI: 0
    [ 969.175068] scsi 7:0:0:1: Direct-Access Generic USB MS Reader 1.03 PQ: 0 ANSI: 0
    [ 969.939417] sd 7:0:0:0: [sdb] 15572992 512-byte logical blocks: (7.97 GB/7.42 GiB)
    [ 969.941028] sd 7:0:0:0: [sdb] Write Protect is off
    [ 969.941037] sd 7:0:0:0: [sdb] Mode Sense: 03 00 00 00
    [ 969.944664] sd 7:0:0:1: [sdc] Attached SCSI removable disk
    [ 969.945509] sd 7:0:0:0: [sdb] No Caching mode page found
    [ 969.945517] sd 7:0:0:0: [sdb] Assuming drive cache: write through
    [ 969.952682] sd 7:0:0:0: [sdb] No Caching mode page found
    [ 969.952693] sd 7:0:0:0: [sdb] Assuming drive cache: write through
    [ 969.956396] sdb: sdb1
    [ 969.965003] sd 7:0:0:0: [sdb] No Caching mode page found
    [ 969.965011] sd 7:0:0:0: [sdb] Assuming drive cache: write through
    [ 969.965015] sd 7:0:0:0: [sdb] Attached SCSI removable disk
    I'm sure I'm just missing something in user management, but I can't find what.
    Last edited by hooya (2014-04-27 03:10:49)

    I am also having the same problem. Root can read and write to automounted drives, but my user cannot. I've tried with a variety of drives, I am assuming they are being automounted by root instead of the logged-in user somehow. (I am running x directly, and am not using a display manager, if that has anything to do with it).
    When I look at how it is mounted it is as follows:
    /dev/sdc1 on /run/media/myuser/drivename type vfat (rw,nosuid,nodev,relatime,uid=1000,gid=1000,fmask=0022,dmask=0077,codepage=437,iocharset=iso8859-1,shortname=mixed,showexec,utf8,flush,errors=remount-ro,uhelper=udisks2)

  • Mounting CDROM as normal user about to pull hair out....

    Hi everyone....
    I'm about up to my wits end trying to allow my normal user to mount and unmount my cdrom drives...
    Here's my /etc/fstab
    # /etc/fstab: static file system information
    # <file system> <dir> <type> <options> <dump> <pass>
    none /proc proc defaults 0 0
    none /dev/pts devpts defaults 0 0
    none /dev/shm tmpfs defaults 0 0
    tmpfs /tmp tmpfs defaults 0 0
    sysfs /sys sysfs defaults 0 0
    usbdevfs /proc/bus/usb usbdevfs defaults 0 0
    /dev/cdroms/cdrom0 /mnt/cd1 iso9660 ro,user,noauto,unhide 0 0
    /dev/cdroms/cdrom1 /mnt/cd2 iso9660 ro,user,noauto,unhide 0 0
    /dev/cdroms/cdrom0 /mnt/dvd udf ro,user,noauto,unhide 0 0
    /dev/floppy/0 /mnt/fl vfat users,noauto,unhide 0 0
    /dev/discs/disc0/part2 swap swap defaults 0 0
    /dev/discs/disc0/part3 / reiserfs defaults 0 0
    /dev/discs/disc0/part1 /boot ext3 defaults 0 1
    I also added a new group called "mount" and added both root and my normal user to it.
    I then did
    chgrp mount /bin/*mount    to change mount and umount to the mount group
    then i did a
    chmod 774 /bin/*mount
    I also made sure that the 3 mount directorys in fstab existed and gave them 777 permissions...
    Did a complete reboot...  and the normal user still can't use mount... I get this error...
    mount: must be superuser to use mount
    I'm at my wits end.  I believe fstab is correct.  I believe my permissions are set correctly...  Is there anything else I need to do?
    Thanks in advance for any replies...
    James

    longhornxtreme wrote:man chmod doesn't say what s does.... so I'm kind of at a loss of understanding...
    The man page says exactly what it does...read more carefully
    the chmod manpage wrote:The letters `rwxXstugo' select the new  permissions  for  the  affected
           users:  read  (r),  write (w), execute (or access for directories) (x),
           execute only if the file is a directory or already has execute  permis-
           sion  for  some user (X), set user or group ID on execution (s), sticky
           (t), the permissions granted to the user who owns  the  file  (u),  the
           permissions  granted to other users who are members of the file's group
           (g), and the permissions granted to users that are in  neither  of  the
           two preceding categories (o).

  • WD My cloud USB drive mount command???

    Hello,
    I've a backup script which is autoscheduled and backs up my data to the usb drive. I would like to keep usb drive unmounted until the script starts since twonky scans my usb drive as well and I couldn't disable it from both twonky setup and my cloud UI. After reboot it starts scanning again. (if you know this, it will be a better solution)
    So after reboot I would like to unmount the usb disk. I found the unmount command in the forum. Thansk to Nazar.
    However I don't know how to mount the drive from the script.
    Can you please help me on this?
    Thanks...

    mount [ -o options,.. ] /dev/sdb1 /path/to/existing/directory  or if you know your stuffs let it auto mount on boot, edit /etc/fstab as below, then mount -a or mount /dev/sdb1: /dev/sdb1   /path/to/existing/directory   filesystem(i.e. vfat)  options(i.e. defaults)    backup-dump(i.e. 0)   pass-fsck(i.e. 0) Note all above is not supported by WD and warrants warranty void. Wrong fstab entries may not boot up your nas properly so I don't recommend this unless you fully understood. I did a mistake once while mounting additional swap space which end up opening the drive just to recover. Read more https://en.wikipedia.org/wiki/Fstab

  • [SOLVED]How exactly are USB drives mounted?

    When I plug in a USB drive, Cinnamon brings up the device in Nemo so I can see its files. The location it's mounted at is /run/media/<username>/<long string I assume to be a UUID>/. How is it that I can mount it again at another directory and use it from there? Also, when I unmount it from the second directory, is it already safe to remove it or do I need to unmount it from the first one as well?
    Last edited by Hurricane (2014-01-01 18:52:25)

    ewaller wrote:How, "Exactly"?
    http://www.usb.org/developers/docs/usb2 … 070113.zip
    http://www.usb.org/developers/docs/devc … 9-2010.pdf
    This is actually along the lines of what I was looking for, lmao.
    nd7rmn8 wrote:cant you place the relevant info by uuid in your /etc/fstab, and then when it automounts, it should mount to that location specified.  twas what i did back in my ubuntu days...
    That's the way I had it on my 8.04. I remember having to set that myself though.
    xtraroot wrote:If it's mounted on more than one place, you'd have to unmount it in those places if you've done file transfers and want to make sure it's safe to remove. You only mentioned one place that it's mounted though?
    I had it mounted at that default location and then I had mounted it onto ~/mnt (I recreated /mnt in my home directory)
    tomk wrote:You seem to lack some understanding about your own system. If your USB devices are automounted when you plug them in, that's because you configured your system to do that. The fact that you are asking how that works should worry you IMO.
    I never configured my system to do that. When I used Arch and XFCE, I don't remember USB drives being automatically mounted. I had to do it myself. Cinnamon apparently does it automatically. What I wanted to know was why, if it does it automatically, does mount not give me an error about trying to mount the same partition again in a different place.
    Thanks for your answers everybody.

  • "Drive not properly ejected"--How do I keep a USB drive mounted constantly?

    I have a 2-month-old iMac, and have had a USB external SATA-enclosure 2.5" 500gb drive attached the whole time. About a week ago, it started randomly giving the "Drive not properly ejected" message and usually it remounts after a few seconds. Sometimes it doesn't and I have to unplug it and plug it back in.
    I thought the drive was at fault, so I switched it with a similar drive that was connected to my AirPort Extreme base station. The problem stayed with the Mac. Also I imagined that (somehow) the iMac wasn't supplying enough power, so I bought a powered USB hub. The result is the same.
    I don't understand how it can work for two months and then suddenly get this problem. The only change along the line is that about a week ago I did a software update ("About this Mac" says it is 10.6.7). The latest update DOES coincide with the appearance of this problem.
    How do I resolve this?
    (Notes: There at least one other thread here where people seem to think that this is a Time Machine problem. I think this is because many people connect large external drives for the purpose of backup. I upgraded to iMac from Mac Mini. I installed Snow Leopard right after I bought the iMac and then tried to restore from my Time Machine backup. Something went wrong, so I mirrored my Mac Mini drive onto a 500gb SATA 2.5", put it in a FireWire enclosure and boot from that. I use the iMac's internal 1T drive for Time Machine. That may sound like "lazy man solution", but it could have a great advantage someday where I could plug that FireWire drive into my Mac Mini and not have any downtime should iMac need to be repaired. The random disconnecting of the USB drive doesn't coincide with any Time Machine events. TM is working fine.)

    Kappy,
    Thank you for your help with this problem!
    Your hypothesis for the drive/enclosure being a problem is good thinking, however:
    -The problem never existed for the first two months I had the iMac.
    -I can switch similar drives with iMac and AirPort Extreme, and the problem stays with the iMac.
    -It has nothing to do with Time Machine as I am using a FireWire drive to boot, and the iMac internal 1TB for Time Machine.
    -A friend suggested a cable problem, but I have tried many combinations and it wouldn't explain why suddenly after 2 months three sets of USB cables can fail at the same time (at least one, I used for 3 years with Mac Mini.)
    I now have a 111gb drive connected to my AirPort Extreme and it has been copying files to my FireWire drive slowly but surely for two hours now. The same drive disconnected after 13 minutes on the iMac. All indications are pointing to OSX 10.6.7. The perfect test (for anyone with convenient resources) would be to install Snow Leopard from disc on a clean Mac and not upgrade it, plug in a USB drive and see if it can last a day or two. Then, upgrade to 10.6.7 and see what happens. I hope someone can try this.
    (Is this a ploy to try to sell more FireWire equipment? I hope not.)

  • USB Drives mount become a device

    My usb flash drives have random decided to not become a device. Basically I put them in, and they get recognized but not deviceified.
    Some info:
    http://pastebin.com/fy1Ddy7u         lsmod
    http://pastebin.com/rgQahfpZ        dmesg
    http://pastebin.com/xmK0BHQN      df -l
    http://pastebin.com/NU6Lfiv4          fstab
    http://pastebin.com/S0ceh4fn        ls /dev
    Sorry about the links. I couldn't figure the url function out.
    Thanks for your help

    I don't know, but I had http://wiki.archlinux.org/index.php/HAL open and it says:
    There are a number of factors involved in 'hotplugging' and HAL is only one of them. When a new device is added, e.g. a USB drive is plugged in, the following occurs (roughly):
        * The kernel becomes aware of a new device and registers it in /sys.
        * Udev creates a device node (e.g. /dev/sdb1), and loads the drivers/modules needed.

  • USB Drive Mounts Read Only

    For some reason now on all my Linux systems but particularly Arch Linux, my USB thunb drive gets auto mounted in Gnome when I plug it in but for some reason it's 'read only'.
    [carlos@tuna ~]$ cd /media/usb/
    [carlos@tuna usb]$ ls -l
    total 3722352
    drwx------ 2 carlos users 8192 Feb 11 10:34 files
    drwx------ 2 carlos users 8192 Feb 13 20:32 movies
    drwx------ 2 carlos users 8192 Jan 31 19:18 music
    drwx------ 4 carlos users 8192 Feb 11 10:34 pics
    drwx------ 2 carlos users 8192 Jan 28 12:17 tv
    -rw-r--r-- 1 carlos users 1564807588 Feb 14 17:40 WELCOM~1.AVI
    /dev/sdg1 on /media/usb type vfat (rw,nosuid,nodev,uhelper=udisks,uid=1000,gid=100,shortname=mixed,dmask=0077,utf8=1,showexec,flush)
    Both on CLI & through my Gnome file browser (Nautilus), I can't re-name, delete, or create new files. I don't understand what has changed. I then tested this on a spare laptop running Ubuntu 10.10 and it too has the same issue.
    Can anyone please explain this to me or help me resolve this problem?

    Correct. In both cases (CLI & GUI) I can't remove, add, or change existing files:
    [carlos@tuna ~]$ cd /media/
    [carlos@tuna media]$ ls -l
    total 8
    drwx------ 9 carlos users 8192 Dec 31 1969 CORSAIR
    [carlos@tuna media]$ cd CORSAIR/
    [carlos@tuna CORSAIR]$ ls -l
    total 3722352
    drwx------ 2 carlos users 8192 Feb 11 10:34 files
    drwx------ 2 carlos users 8192 Feb 13 20:32 movies
    drwx------ 2 carlos users 8192 Jan 31 19:18 music
    drwx------ 4 carlos users 8192 Feb 11 10:34 pics
    drwx------ 2 carlos users 8192 Jan 28 12:17 tv
    -rw-r--r-- 1 carlos users 1564807588 Feb 14 17:40 WELCOM~1.AVI
    [carlos@tuna CORSAIR]$ rm WELCOM~1.AVI
    rm: cannot remove `WELCOM~1.AVI': Read-only file system
    I can't even change the permissions on the file:
    chmod: changing permissions of `WELCOM~1.AVI': Read-only file system

  • USB Drive unmounts from airport extreme

    I have a 1TB segate USB drive mounted on my Airport etreme which I mapped as drive z: on my win 8 laptop.
    Somtimes when the laptop comes out of sleep mode, the drive will not remount unless I reboot the PC.
    Somtimes I can't even remount the drive using the base station agent, it will not let me log into the drive.
    Yes the drive is formatted as fat32.
    Any suggestions?

    You can use thumb drive.. it has to be formatted correctly.. fat32 or HFS+ of course.
    And they are not very big.. so I am not sure how big your songs are.. in the apple world you have your songs on itunes and definitely this is unsuitable for the itunes library.. you still need itunes on a computer to share it to the network.

  • Installing Leopard on external USB drive

    Hi there,
    I am trying to wipe a drive clean via an external USB drive box. Might somebody explain how I can do this? When I boot on the Leopard DVD I arrive at the drive choice screen and there is a big red "exclamation point" on the external USB drive mount icon. What can I do to get around this problem?
    Cheers,
    Noah

    Noah Wallach wrote:
    Hi there,
    I am trying to wipe a drive clean via an external USB drive box. Might somebody explain how I can do this? When I boot on the Leopard DVD I arrive at the drive choice screen and there is a big red "exclamation point" on the external USB drive mount icon. What can I do to get around this problem?
    Cheers,
    Noah
    Although you can boot some systems via USB, the drive must first and foremost be bootable. Not all external drives are bootable. The firmware must support booting. For example, my Maxtor 160 that I use for TM on my G5 states in the manual that it cannot boot.
    You are having a somewhat different issue, in that you are not yet ready to boot, but the drive cannot be seen by DU.
    I would see if the external drive can first be partitioned and formatted in Leopard directly by running DU in the Leopard Utility folder, not from the DVD.
    I would check for a firmware update for your drive box.

  • Single-user mode: How to mount and access an external USB drive?

    My MacBook Pro HD is acting up. Cannot boot normally or into "safe mode". Cannot reinstall OS without wiping out the HD. Need to recover some critical files but DiskUtil First Aid and Restore options cannot successfully complete. Problem traced down to "invalid node structure" which means I either have a hardware problem or my filesystem partition directory structure is corrupted. I need to recover some files that are not backed up (timin issue with my regular backup process).
    I can boot into single-user mode, mount the root file system (/sbin/mount -uw /) and can see/navigate the rot filesystem structure via good UNIX command line. Here's what I would like to do (in single-user mode):
    1. Mount an external USB drive (250 GB already formatted as Mac OS X Extended)
    2. Copy various files and/or directories from my HD to the external USB drive (UNIX cp command)
    I realize I could go spend $$ for the Disk Warrior or Data Rescue products (or something similar) that SHOULD help me recover my HD or files, but it seems silly to do this when I can see, touch and taste them from within single-user mode....
    Comments? Suggestions?
    TIA --
    Trent
    P.S. Once I've recovered my files, I'll try to reformat the HD and then reinstall the OS. And THEN go have Apple look at my machine (thank goodness for AppleCare coverage)!

    Resolution:
    1) Boot system in single-user mode (SUM) with external HD attached.
    2) Execute the following UNIX CLI commands once SUM boot process is completed:
    # fsck -fy
    # mount -uw /
    # mkdir /Volumes/target_directory
    # mount -t hfs -w /dev/diskXXX /Volumes/target_directory
    # cp -RXv /source_directory /Volumes/target_directory
    Where XXX is the device-level name for your external HD's data partition. In my case this was /dev/disk1s2. It may take some experimentation to identify this device name if your system has multiple HD's.
    3) Verify contents were successfully copied onto the /Volumes/target_directory.
    Comments and observations:
    - Do NOT use "/" as your source directory - cp will make a second (redundant) copy of /volumes/target_directory
    - I was able to successfully copy ALL files off my HD despite the fsck command's "invalid node structure" error message with this simple procedure. YMMV, depending on the state of your HD.
    - The repeated disk0s2: I/O error warnings displayed during the SUM boot process did not seem to have a negative effect on this procedure. I also received this same error warning intermittently as I navigated the mounted filesystem did not seem to be a problem, either. Again, YMMV.
    Commercial software:
    I downloaded ProSoft Engineering's Data Rescue 3 product (trial version) before spending $99 to attempt to recover my "bad" HD's data via mounting to a good system with FW target mode. It could not successfully complete its "QuickScan" process and immediately hung on block 0 of 390M during its "Deep Scan" process. The product did seem to function properly on an operational system. ProSoft's technical support was responsive and helpful but had no answer for my "Deep Scan" error.
    I did not attempt to use Alsoft's Disk Warrior 4 product. I could not find any trial software available and was reluctant to spend $100 based upon the mixed reviews and comments on this discussion forum as well as other reviews. Alsoft does claim to address the "invalid node structure" error in their marketing materials. Hindsight being 20/20 - I saved $100 by using this simple procedure.
    Final note:
    Neither Leopard nor Snow Leopard's installation DVD could recognize the bad internal HD when trying to do a reinstall. While DiskUtil was able to "see" the bad internal drive it immediately failed when I tried to do an "erase and format". Took the system to my local Apple store and the Genius ran a tool called "SMART Utility" from Volitans Software (www.volitans-software.com). SMART utility confirmed that my HD was bad so it was replaced. AppleCare pays for itself (once again!).

  • Mounting USB drive as regular user (with ntfs-3g)

    Hello. First of all, I not asking to do the homework for me, rather is someone can help me understand why I can't get this work.
    I spent the last night trying to figure how mount an USB drive as a regular user, using ntfs-3g. I read the related wiki entries and researched quite a lot in the forums. I came up with this:
    fstab:
    # /etc/fstab: static file system information
    # <file system> <dir> <type> <options> <dump> <pass>
    devpts /dev/pts devpts defaults 0 0
    shm /dev/shm tmpfs nodev,nosuid 0 0
    #/dev/cdrom /media/cd auto ro,user,noauto,unhide 0 0
    #/dev/dvd /media/dvd auto ro,user,noauto,unhide 0 0
    #/dev/fd0 /media/fl auto user,noauto 0 0
    /dev/sda1 / ext3 defaults,noatime 0 1
    /dev/sda2 /home ext3 defaults,noatime 0 2
    /dev/sda3 swap swap defaults 0 0
    /dev/sdb1 /mnt/usb ntfs-3g noauto,uid=0,gid=0,noatime,umask=000, 0 0
    I created a ntfsuser group, added my user to that group and trim permissions to the ntfd-3g executable (link in this post). That allows me mount the partition as root and read/write as regular user. It works, so (i think) not big deal here.
    However if I add user to the mount options the following error shows up:
    Mount is denied because setuid and setgid root ntfs-3g is insecure with the
    external FUSE library. Either remove the setuid/setgid bit from the binary
    or rebuild NTFS-3G with integrated FUSE support and make it setuid root.
    Please see more information at http://ntfs-3g.org/support.html#unprivileged
    What bugs me the most is I don't understand why I can't mount as regular user when the user option is set in the fstab. Shouldn't that allow regular users to mount and unmount? Is not like that I'm mounting and dismounting USB drives every 5', but I would like to get this done because I know it can be done
    Sorry for asking such trivial question, but I sense that I'm missing something really stupid and I just can't figure what it is

    Beware of the double post! (+1)
    Ok, I decided I'd get this to work, although the method and the implications it could have might not seem pretty to some. There are certain conditions for a user to mount any ntfs volume with ntfs-3g, I will name them here:
    1. ntfs-3g with integrated fuse support. You'll get this by:
        1A. Removing ntfs-3g and fuse from your system if you have them installed as separate packages, so do this as root:
    pacman -Rn ntfs-3g
    pacman -Rn fuse
    Now you can install the new package.
        1B. Getting a modified version of the PKGBUILD found in that AUR link previously mentioned by me, here's mine:
    # Maintainer: Gula <gulanito.archlinux.org>
    # Slightly modified by anderfs
    # Don't forget to setuid-root for the ntfs-3g binary after you install this
    pkgname=ntfs-3g-fuse-internal
    pkgver=2010.5.16
    pkgrel=1
    pkgdesc="Stable read and write NTFS driver (whit internal fuse suport)"
    url="http://www.tuxera.com"
    arch=('i686' 'x86_64')
    license=('GPL2')
    depends=('glibc')
    conflicts=('ntfs-3g')
    makedepends=('pkgconfig')
    options=('!libtool')
    source=(http://www.tuxera.com/opensource/ntfs-3g-${pkgver}.tgz
    http://aur.archlinux.org/packages/ntfs-3g-fuse-internal/ntfs-3g-fuse-internal/25-ntfs-config-write-policy.fdi)
    sha1sums=('895da556ad974743841f743c49b734132b2a7cbc'
    '200029f2999a2c284fd30ae25734abf6459c3501')
    build() {
    cd "${srcdir}/ntfs-3g-${pkgver}"
    ac_cv_path_LDCONFIG=/bin/true ./configure --prefix=/usr \
    --with-fuse=internal --disable-static || return 1
    make || return 1
    package() {
    cd "${srcdir}/ntfs-3g-${pkgver}"
    make DESTDIR="${pkgdir}" install || return 1
    ln -s /bin/ntfs-3g "${pkgdir}/sbin/mount.ntfs" || return 1
    install -m755 -d "${pkgdir}/usr/share/hal/fdi/policy/10osvendor"
    install -m644 "${srcdir}/25-ntfs-config-write-policy.fdi" "${pkgdir}/usr/share/hal/fdi/policy/10osvendor/" || return 1
    Save this as PKGBUILD, preferrably in an empty directory so it doesn't clutter things up when you build it.
        1C. Now go to the directory where you saved it and do this as a regular user:
    makepkg PKGBUILD
    After that's done, you'll get a package called ntfs-3g-fuse-internal-2010.5.16-1-i686.pkg.tar.xz, or something similar.
        1D. Install that package as root:
    pacman -U ntfs-3g-fuse-internal-2010.5.16-1-i686.pkg.tar.xz
    If all went well you now have ntfs-3g compiled with integrated fuse support.
    2. The ntfs-3g version must be higher than 1.2506, this is already covered, the package installed from AUR matches this requirement.
    3. The ntfs-3g binary must be set to setuid-root, to accomplish this you shall do the following as root:
    chown root $(which ntfs-3g)
    chmod 4755 $(which ntfs-3g)
    I used 4750 instad of 4755, I guess that last bit can be a matter of personal taste as long as it isn't something obnoxious like "7".
    4. The user must have the right access to the volume. Okay, this is the ugly part, volumes are owned by root and managed by the disk group with permissions brw-rw----, this means you have to add any users you want mounting this volume to the disk group.
        4A. So, do this as root:
    gpasswd -a [user] disk
    Where [user] is obviously the name of whichever user you're adding to the disk group, do this for any user you want mounting this volume.
        Any users currently logged in will have to log out and back in for these change to take effect, this most likely includes you.
        4B. Now that you logged back in, try this:
    groups
    One of the groups listed should be disk, if it's not there you didn't completely log out of all open sessions.
    5. The user must have the right permissions/access to the mount point. For a user to be able to mount something to a mount point, that user needs to have read permission (pretty self-explanatory), write permission (so the user can make any changes to the sub-structure of the mount point), and execute permission (so the user can change-dir to that mount point) to it. Mount points can be anywhere, so this really depends where you're mounting.
    In my case, I'm mounting these volumes on certain directories under /mnt/, for example /mnt/example. If you're mounting stuff there, you might as well take advantage of the fact your "mounting user" is already in the group disk, and do the following as root:
    chgrp disk /mnt/example
    chmod 774 /mnt/example
    Now users in the disk group will be able to manage these mount points.
    6. Mount it. That's it, you should now be able to mount ntfs volumes as an "unpriveleged enough" user. Here's an example of what you'd have to put in /etc/fstab:
    UUID=XXXXYYYYXXXXYYYY /mnt/example ntfs-3g noauto,noatime,user,uid=0,gid=6,fmask=137,dmask=027,rw 0 0
    uid=0 means root will be the owner of this mount-point and anything in it after it's mounted. This is due to the fact that even though users might own their mountpoints and have rwx permissions on them, you might still not want them to write to the mounted ntfs volumes. Remove this if you want them to be able to write to the volume.
    gid=6 means this will be managed by the disk group in my system. Perhaps the disk group has a different id in your system, run "id root" to find out, as root usually is part of this group.
    fmask = 137 means the owner (root) can do anything with files in this volume except executing files. Group members (disk) can only read files here, not create or execute them. And other users can't do anything in this volume.
    dmask = 027 means the owner can do anything with directories (execute here is needed to chdir), users can't write directories but they can read or execute in them (once again, needed by 'cd'), and finally other users still don't have any access.
    You can use whichever fmask and dmask makes sense to you, or use an umask instead.
    Last edited by anderfs (2010-07-15 11:34:48)

  • Can't mount usb devices as a normal user

    Hi.
    I woud like to ask for help. I've been struggling with some "bug" that i came with Arch and usb devices (disks, pendrives). I can't mount it as a normal user using KDE default mounting software (Dolphin, for an exmample). I can mount it only in therminal by using sudo privileages. Is there a way to fix it? I read it, the same problem:
    https://bbs.archlinux.org/viewtopic.php?id=180025
    I tried to check everything according this topic, also with udisk2 archwiki thread but on my desktop machine i just can't mount usb devices without root password. This is how the error looks like for a Dolphin:
    <Over sized Image removed. URL link preserved>
    This is the error, from picture
    Error when trying to use acces to "removable device 7,5GB". System showed: The requested operation has failed. Error checking authorization:
    GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: action org.freedesktop.udisks2.filesystem-mount is not registered (polkit-error-quark, 0)
    Could somebody help me? I even installed udisk mounting tool to mont without root password, added 50-udisks.policy and it just does not work.
    Help.
    I can mount it wit terminal by typing
    sudo mount /dev/sdXY /mnt/usb
    than i'm asked for password and it is mounted. Don't know why i can't mount it without password when connecting usb devices to usb port.
    moderator edit [ewaller]Removed link to over sized image..  Note, you set up a click through thumbnail correctly, but the "Thumbnail" was the same image and was too large
    Last edited by ewaller (2014-09-28 16:37:41)

    Some refresh. I followed this topic:
    https://bbs.archlinux.org/viewtopic.php?id=180025
    with the same problem. I found errors here:
    firekage@arch_desktop ~]$ journalctl -r -u polkit
    -- Logs begin at pią 2014-06-13 18:04:12 CEST, end at czw 2014-12-25 20:15:01 CET. --
    cze 23 15:59:15 arch_desktop polkitd[306]: Unregistered Authentication Agent for unix-session:c1 (system bus name :1.24, object path /org/kde/PolicyKit1/AuthenticationAgent, locale pl_PL.UTF-8) (disconnected from bus)
    cze 23 15:29:59 arch_desktop polkitd[306]: Operator of unix-session:c1 FAILED to authenticate to gain authorization for action org.freedesktop.udisks2.filesystem-mount-system for system-bus-name::1.11 [kdeinit4: kded4 [kdeinit]] (owned by unix-user:firekage)
    cze 20 22:21:05 arch_desktop polkitd[306]: Operator of unix-session:c1 FAILED to authenticate to gain authorization for action org.freedesktop.udisks2.filesystem-mount-system for system-bus-name::1.11 [kdeinit4: kded4 [kdeinit]] (owned by unix-user:firekage)
    cze 20 22:21:03 arch_desktop polkitd[306]: Operator of unix-session:c1 FAILED to authenticate to gain authorization for action org.freedesktop.udisks2.filesystem-mount-system for system-bus-name::1.11 [kdeinit4: kded4 [kdeinit]] (owned by unix-user:firekage)
    cze 20 22:21:01 arch_desktop polkitd[306]: Operator of unix-session:c1 FAILED to authenticate to gain authorization for action org.freedesktop.udisks2.filesystem-mount-system for system-bus-name::1.11 [kdeinit4: kded4 [kdeinit]] (owned by unix-user:firekage)
    cze 20 22:21:00 arch_desktop polkitd[306]: Operator of unix-session:c1 FAILED to authenticate to gain authorization for action org.freedesktop.udisks2.filesystem-mount-system for system-bus-name::1.11 [kdeinit4: kded4 [kdeinit]] (owned by unix-user:firekage)
    cze 20 22:20:59 arch_desktop polkitd[306]: Operator of unix-session:c1 FAILED to authenticate to gain authorization for action org.freedesktop.udisks2.filesystem-mount-system for system-bus-name::1.11 [kdeinit4: kded4 [kdeinit]] (owned by unix-user:firekage)
    cze 20 22:20:58 arch_desktop polkitd[306]: Operator of unix-session:c1 FAILED to authenticate to gain authorization for action org.freedesktop.udisks2.filesystem-mount-system for system-bus-name::1.11 [kdeinit4: kded4 [kdeinit]] (owned by unix-user:firekage)
    cze 20 22:20:06 arch_desktop polkitd[306]: Registered Authentication Agent for unix-session:c1 (system bus name :1.24 [/usr/lib/kde4/libexec/polkit-kde-authentication-agent-1], object path /org/kde/PolicyKit1/AuthenticationAgent, locale pl_PL.UTF-8)
    cze 20 22:19:49 arch_desktop systemd[1]: Started Authorization Manager.
    cze 20 22:19:49 arch_desktop polkitd[306]: Acquired the name org.freedesktop.PolicyKit1 on the system bus
    cze 20 22:19:49 arch_desktop polkitd[306]: Finished loading, compiling and executing 1 rules
    cze 20 22:19:49 arch_desktop polkitd[306]: Loading rules from directory /usr/share/polkit-1/rules.d
    cze 20 22:19:49 arch_desktop polkitd[306]: Loading rules from directory /etc/polkit-1/rules.d
    cze 20 22:19:49 arch_desktop polkitd[306]: Started polkitd version 0.112
    -- Reboot --
    cze 20 22:15:10 arch_desktop systemd[1]: Stopping Authorization Manager...
    cze 20 22:15:08 arch_desktop polkitd[304]: Unregistered Authentication Agent for unix-session:c1 (system bus name :1.23, object path /org/kde/PolicyKit1/AuthenticationAgent, locale pl_PL.UTF-8)
    cze 20 22:02:59 arch_desktop polkitd[304]: Operator of unix-session:c1 FAILED to authenticate to gain authorization for action org.freedesktop.udisks2.filesystem-mount-system for system-bus-name::1.11 [kdeinit4: kded4 [kdeinit]] (owned by unix-user:firekage)
    cze 20 22:02:56 arch_desktop polkitd[304]: Operator of unix-session:c1 FAILED to authenticate to gain authorization for action org.freedesktop.udisks2.filesystem-mount-system for system-bus-name::1.11 [kdeinit4: kded4 [kdeinit]] (owned by unix-user:firekage)
    cze 20 22:02:55 arch_desktop polkitd[304]: Operator of unix-session:c1 FAILED to authenticate to gain authorization for action org.freedesktop.udisks2.filesystem-mount-system for system-bus-name::1.11 [kdeinit4: kded4 [kdeinit]] (owned by unix-user:firekage)
    cze 20 22:02:54 arch_desktop polkitd[304]: Operator of unix-session:c1 FAILED to authenticate to gain authorization for action org.freedesktop.udisks2.filesystem-mount-system for system-bus-name::1.11 [kdeinit4: kded4 [kdeinit]] (owned by unix-user:firekage)
    cze 20 22:02:53 arch_desktop polkitd[304]: Operator of unix-session:c1 FAILED to authenticate to gain authorization for action org.freedesktop.udisks2.filesystem-mount-system for system-bus-name::1.11 [kdeinit4: kded4 [kdeinit]] (owned by unix-user:firekage)
    cze 20 22:00:00 arch_desktop polkitd[304]: Registered Authentication Agent for unix-session:c1 (system bus name :1.23 [/usr/lib/kde4/libexec/polkit-kde-authentication-agent-1], object path /org/kde/PolicyKit1/AuthenticationAgent, locale pl_PL.UTF-8)
    cze 20 21:59:26 arch_desktop systemd[1]: Started Authorization Manager.
    cze 20 21:59:26 arch_desktop polkitd[304]: Acquired the name org.freedesktop.PolicyKit1 on the system bus
    cze 20 21:59:26 arch_desktop polkitd[304]: Finished loading, compiling and executing 1 rules
    cze 20 21:59:26 arch_desktop polkitd[304]: Loading rules from directory /usr/share/polkit-1/rules.d
    cze 20 21:59:26 arch_desktop polkitd[304]: Loading rules from directory /etc/polkit-1/rules.d
    cze 20 21:59:26 arch_desktop polkitd[304]: Started polkitd version 0.112
    cze 20 21:59:26 arch_desktop systemd[1]: Starting Authorization Manager...
    -- Reboot --
    cze 20 21:58:39 arch_desktop systemd[1]: Stopped Authorization Manager.
    cze 20 21:58:39 arch_desktop systemd[1]: Stopping Authorization Manager...
    cze 20 21:55:01 arch_desktop polkitd[306]: Operator of unix-session:c1 FAILED to authenticate to gain authorization for action org.freedesktop.udisks2.filesystem-mount-system for system-bus-name::1.10 [kdeinit4: kded4 [kdeinit]] (owned by unix-user:firekage)
    cze 20 21:54:59 arch_desktop polkitd[306]: Operator of unix-session:c1 FAILED to authenticate to gain authorization for action org.freedesktop.udisks2.filesystem-mount-system for system-bus-name::1.10 [kdeinit4: kded4 [kdeinit]] (owned by unix-user:firekage)
    cze 20 21:54:58 arch_desktop polkitd[306]: Operator of unix-session:c1 FAILED to authenticate to gain authorization for action org.freedesktop.udisks2.filesystem-mount-system for system-bus-name::1.10 [kdeinit4: kded4 [kdeinit]] (owned by unix-user:firekage)
    cze 20 21:54:56 arch_desktop polkitd[306]: Operator of unix-session:c1 FAILED to authenticate to gain authorization for action org.freedesktop.udisks2.filesystem-mount-system for system-bus-name::1.10 [kdeinit4: kded4 [kdeinit]] (owned by unix-user:firekage)
    cze 20 21:54:56 arch_desktop polkitd[306]: Operator of unix-session:c1 FAILED to authenticate to gain authorization for action org.freedesktop.udisks2.filesystem-mount-system for system-bus-name::1.10 [kdeinit4: kded4 [kdeinit]] (owned by unix-user:firekage)
    cze 20 21:47:40 arch_desktop polkitd[306]: Registered Authentication Agent for unix-session:c1 (system bus name :1.21 [/usr/lib/kde4/libexec/polkit-kde-authentication-agent-1], object path /org/kde/PolicyKit1/AuthenticationAgent, locale pl_PL.UTF-8)
    cze 20 21:47:22 arch_desktop systemd[1]: Started Authorization Manager.
    cze 20 21:47:22 arch_desktop polkitd[306]: Acquired the name org.freedesktop.PolicyKit1 on the system bus
    cze 20 21:47:22 arch_desktop polkitd[306]: Finished loading, compiling and executing 1 rules
    cze 20 21:47:22 arch_desktop polkitd[306]: Loading rules from directory /usr/share/polkit-1/rules.d
    cze 20 21:47:22 arch_desktop polkitd[306]: Loading rules from directory /etc/polkit-1/rules.d
    cze 20 21:47:22 arch_desktop polkitd[306]: Started polkitd version 0.112
    cze 20 21:47:22 arch_desktop systemd[1]: Starting Authorization Manager...
    -- Reboot --
    cze 20 19:56:46 arch_desktop systemd[1]: Stopping Authorization Manager...
    cze 20 19:56:45 arch_desktop polkitd[310]: Unregistered Authentication Agent for unix-session:c1 (system bus name :1.21, object path /org/kde/PolicyKit1/AuthenticationAgent, locale pl_PL.UTF-8)
    cze 20 19:55:51 arch_desktop polkitd[310]: Registered Authentication Agent for unix-session:c1 (system bus name :1.21 [/usr/lib/kde4/libexec/polkit-kde-authentication-agent-1], object path /org/kde/PolicyKit1/AuthenticationAgent, locale pl_PL.UTF-8)
    cze 20 19:55:16 arch_desktop systemd[1]: Started Authorization Manager.
    cze 20 19:55:16 arch_desktop polkitd[310]: Acquired the name org.freedesktop.PolicyKit1 on the system bus
    cze 20 19:55:16 arch_desktop polkitd[310]: Finished loading, compiling and executing 1 rules
    cze 20 19:55:16 arch_desktop polkitd[310]: Loading rules from directory /usr/share/polkit-1/rules.d
    cze 20 19:55:16 arch_desktop polkitd[310]: Loading rules from directory /etc/polkit-1/rules.d
    cze 20 19:55:16 arch_desktop polkitd[310]: Started polkitd version 0.112
    cze 20 19:55:16 arch_desktop systemd[1]: Starting Authorization Manager...
    -- Reboot --
    cze 20 19:54:38 arch_desktop systemd[1]: Stopping Authorization Manager...
    cze 20 19:54:13 arch_desktop polkitd[305]: Unregistered Authentication Agent for unix-session:c1 (system bus name :1.21, object path /org/kde/PolicyKit1/AuthenticationAgent, locale pl_PL.UTF-8)
    cze 20 16:47:01 arch_desktop polkitd[305]: Operator of unix-session:c1 FAILED to authenticate to gain authorization for action org.freedesktop.udisks2.filesystem-mount-system for system-bus-name::1.10 [kdeinit4: kded4 [kdeinit]] (owned by unix-user:firekage)
    cze 20 03:02:19 arch_desktop polkitd[305]: Operator of unix-session:c1 FAILED to authenticate to gain authorization for action org.freedesktop.udisks2.filesystem-mount-system for system-bus-name::1.10 [kdeinit4: kded4 [kdeinit]] (owned by unix-user:firekage)
    cze 19 21:32:38 arch_desktop polkitd[305]: Operator of unix-session:c1 FAILED to authenticate to gain authorization for action org.freedesktop.udisks2.filesystem-mount-system for system-bus-name::1.10 [kdeinit4: kded4 [kdeinit]] (owned by unix-user:firekage)
    cze 19 19:25:08 arch_desktop polkitd[305]: Operator of unix-session:c1 FAILED to authenticate to gain authorization for action org.freedesktop.udisks2.filesystem-mount-system for system-bus-name::1.10 [kdeinit4: kded4 [kdeinit]] (owned by unix-user:firekage)
    cze 19 19:24:40 arch_desktop polkitd[305]: Operator of unix-session:c1 FAILED to authenticate to gain authorization for action org.freedesktop.udisks2.filesystem-mount-system for system-bus-name::1.10 [kdeinit4: kded4 [kdeinit]] (owned by unix-user:firekage)
    cze 19 19:24:38 arch_desktop polkitd[305]: Operator of unix-session:c1 FAILED to authenticate to gain authorization for action org.freedesktop.udisks2.filesystem-mount-system for system-bus-name::1.10 [kdeinit4: kded4 [kdeinit]] (owned by unix-user:firekage)
    cze 19 19:24:36 arch_desktop polkitd[305]: Operator of unix-session:c1 FAILED to authenticate to gain authorization for action org.freedesktop.udisks2.filesystem-mount-system for system-bus-name::1.10 [kdeinit4: kded4 [kdeinit]] (owned by unix-user:firekage)
    cze 19 19:24:35 arch_desktop polkitd[305]: Operator of unix-session:c1 FAILED to authenticate to gain authorization for action org.freedesktop.udisks2.filesystem-mount-system for system-bus-name::1.10 [kdeinit4: kded4 [kdeinit]] (owned by unix-user:firekage)
    cze 19 19:24:34 arch_desktop polkitd[305]: Operator of unix-session:c1 FAILED to authenticate to gain authorization for action org.freedesktop.udisks2.filesystem-mount-system for system-bus-name::1.10 [kdeinit4: kded4 [kdeinit]] (owned by unix-user:firekage)
    Could somebody help me? I even checked all rules in /etc/polkit-1/rules.d and /usr/share/polkit-1/actions on my notebook, and all files are the same with the same user permission but on notebook i can mount usb without problem, but on my desktop can't at all.

  • Mounting USB Drive in Single user mode

    My Intel Imac fails to boot up. fsck -y fails too ... can't think of any other way to get my data out ...
    I am left with the only option to copy my data into my usb drive in the terminal mode .
    But I am unable to mount my USB drive. I also need to know the mount point. can anyone provide me with help.

    The mountpoint can be anything you want. The tricky part is figuring out the device your drive is using. I don't know for sure (can't test it right now), but dmesg or one of the system logs might have that information in it if you boot to SUM with the external drive attached. The logs also might have a record of what device this drive used in the past when connected. It will likely use the same device every time.
    If not, you can guess. I have seen one of my external disks mount using the device disk1s2. If I were to attach that to my machine in SUM, I could then mount it like this:
    mount_hfs /dev/disk1s2 /Volumes/recover
    where the mount point /Volumes/recover is something I created (i.e. just a simple "mkdir /Volumes/recover"). This could be anything you want.

  • Mount a Drive with Normal User Access

    How do I do this? Even better, can I mount it automatically. I know this has something to do with /etc/fstab
    What should I append to /dev /sda2 /mnt/mac to make it mount automatically and allow the normal user access?
    It's where I store my music library.

    duke11235 wrote:How do I do this? Even better, can I mount it automatically. I know this has something to do with /etc/fstab
    What should I append to /dev /sda2 /mnt/mac to make it mount automatically and allow the normal user access?
    It's where I store my music library.
    Every question you asked is answered in the Wiki - please read it and then try and implement it yourself. If it doesn't work, then come back with a description of what you tried, what errors you got and any other material you have come across.
    This is help-vampirism.
    Closing.

Maybe you are looking for

  • Calling Stored Procedure with Paramters in Java

    Hi I havent done alot of sql/java work so I'm wondering if I could get some help. I have the java code private void processPatient(Element pat) throws PatientException, ParseException, SQLException, Exception { Connection con = null; ResultSet rs; Ca

  • Question about bit operation

    1/ I know I can use << to translate from number of index to the binary number. But how can I translate from binary number to number of index? (e.g. 1024 translates to 10) 2/ How can I separate two bits in a number? (e.g. 144 translates to 128+16) 3/

  • Where can i get a restore disc for macmini 10.5, cant find one anywhere

    where can i get a restore disc for macmini 10.5.8, looked everywhere cant find one, not in apple store, ebay, amazon, help! want to put system back to factory settings to try and sell. thanks

  • I am getting an ITunes.exe system error MSVCR80.dll how can I fix this?

    I am trying to sync my phone to my laptop. ITunes was installed and has been working. All of a sudden I am gettingan ITUNES.EXE system error MSVCR80.dll is missing. I have removed the ITunes from my computer and reinstalled it ... It did not install

  • Installing an old version of Flash on a Macbook Air

    Hi, I have an old 10.6GHz Macbook Air which I need to install Adobe Flash onto. The newest version requires a 10.83GHz processor or faster. Is it possible to download an older version of Flash that will be compatible with my slower processor? Thanks