You are not logged in.

#1 2009-08-24 01:31:09

Sirrah
Member
Registered: 2009-05-16
Posts: 22

Unable to read or modify data on external USB hard drive.

I keep getting a "permission denied" error when trying to access my external hard drive.  I've tried changing permissions with chmod and even sudo thunar, but I can't get it to work.  Any ideas would be appreciated.  I've tried several ideas from all over the forums (none of which I can now remember, as I just got back from a month's vacation without computer or internet access).

/etc/rc.conf

#
# /etc/rc.conf - Main Configuration for Arch Linux
#

# -----------------------------------------------------------------------
# LOCALIZATION
# -----------------------------------------------------------------------
#
# LOCALE: available languages can be listed with the 'locale -a' command
# HARDWARECLOCK: set to "UTC" or "localtime"
# USEDIRECTISA: use direct I/O requests instead of /dev/rtc for hwclock
# TIMEZONE: timezones are found in /usr/share/zoneinfo
# KEYMAP: keymaps are found in /usr/share/kbd/keymaps
# CONSOLEFONT: found in /usr/share/kbd/consolefonts (only needed for non-US)
# CONSOLEMAP: found in /usr/share/kbd/consoletrans
# USECOLOR: use ANSI color sequences in startup messages
#
LOCALE="en_US.utf8"
HARDWARECLOCK="localtime"
USEDIRECTISA="no"
TIMEZONE="America/Los_Angeles"
KEYMAP="us"
CONSOLEFONT=
CONSOLEMAP=
USECOLOR="yes"

# -----------------------------------------------------------------------
# HARDWARE
# -----------------------------------------------------------------------
#
# MOD_AUTOLOAD: Allow autoloading of modules at boot and when needed
# MOD_BLACKLIST: Prevent udev from loading these modules
# MODULES: Modules to load at boot-up. Prefix with a ! to blacklist.
#
# NOTE: Use of 'MOD_BLACKLIST' is deprecated. Please use ! in the MODULES array.
#
MOD_AUTOLOAD="yes"
#MOD_BLACKLIST=() #deprecated
MODULES=(!pcspkr !snd_pcsp)

# Scan for LVM volume groups at startup, required if you use LVM
USELVM="no"

# -----------------------------------------------------------------------
# NETWORKING
# -----------------------------------------------------------------------
#
# HOSTNAME: Hostname of machine. Should also be put in /etc/hosts
#
HOSTNAME="arch"

# Use 'ifconfig -a' or 'ls /sys/class/net/' to see all available interfaces.
#
# Interfaces to start at boot-up (in this order)
# Declare each interface then list in INTERFACES
#   - prefix an entry in INTERFACES with a ! to disable it
#   - no hyphens in your interface names - Bash doesn't like it
# 
# DHCP:     Set your interface to "dhcp" (eth0="dhcp")
# Wireless: See network profiles below
#
eth0="dhcp"
INTERFACES=(eth0)

# Routes to start at boot-up (in this order)
# Declare each route then list in ROUTES
#   - prefix an entry in ROUTES with a ! to disable it
#
gateway="default gw 192.168.0.1"
ROUTES=(!gateway)
 
# Enable these network profiles at boot-up.  These are only useful
# if you happen to need multiple network configurations (ie, laptop users)
#   - set to 'menu' to present a menu during boot-up (dialog package required)
#   - prefix an entry with a ! to disable it
#
# Network profiles are found in /etc/network.d
#
# This now requires the netcfg package
#
#NETWORKS=(main)

# -----------------------------------------------------------------------
# DAEMONS
# -----------------------------------------------------------------------
#
# Daemons to start at boot-up (in this order)
#   - prefix a daemon with a ! to disable it
#   - prefix a daemon with a @ to start it up in the background
#
DAEMONS=(syslog-ng hal dbus network netfs crond alsa fam)

/etc/dbus-1/system.d/hal.conf

<!DOCTYPE busconfig PUBLIC
 "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
 "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>

  <!-- This configuration file specifies the required security policies
       for the HAL to work. -->

  <!-- Only root or user hal can own the HAL service -->
  <policy user="hal">
    <allow own="org.freedesktop.Hal"/>
  </policy>
  <policy user="root">
    <allow own="org.freedesktop.Hal"/>
  </policy>

  <!-- Allow anyone to invoke methods on the Manager and Device interfaces -->
  <policy context="default">
    <allow send_destination="org.freedesktop.Hal"
           send_interface="org.freedesktop.DBus.Introspectable"/>
    <allow send_destination="org.freedesktop.Hal"
           send_interface="org.freedesktop.DBus.Properties" />

    <allow send_destination="org.freedesktop.Hal"
           send_interface="org.freedesktop.Hal.Device"/>
    <allow send_destination="org.freedesktop.Hal"
           send_interface="org.freedesktop.Hal.Manager"/>

    <allow send_destination="org.freedesktop.Hal"
           send_interface="org.freedesktop.Hal.Device.CPUFreq"/>
    <allow send_destination="org.freedesktop.Hal"
           send_interface="org.freedesktop.Hal.Device.DockStation"/>
    <allow send_destination="org.freedesktop.Hal"
           send_interface="org.freedesktop.Hal.Device.KillSwitch"/>
    <allow send_destination="org.freedesktop.Hal"
           send_interface="org.freedesktop.Hal.Device.KeyboardBacklight"/>
    <allow send_destination="org.freedesktop.Hal"
           send_interface="org.freedesktop.Hal.Device.LaptopPanel"/>
    <allow send_destination="org.freedesktop.Hal"
           send_interface="org.freedesktop.Hal.Device.Leds"/>
    <allow send_destination="org.freedesktop.Hal"
           send_interface="org.freedesktop.Hal.Device.LightSensor"/>
    <allow send_destination="org.freedesktop.Hal"
           send_interface="org.freedesktop.Hal.Device.Storage"/>
    <allow send_destination="org.freedesktop.Hal"
           send_interface="org.freedesktop.Hal.Device.Storage.Removable"/>
    <allow send_destination="org.freedesktop.Hal"
           send_interface="org.freedesktop.Hal.Device.SystemPowerManagement"/>
    <allow send_destination="org.freedesktop.Hal"
           send_interface="org.freedesktop.Hal.Device.Volume"/>
    <allow send_destination="org.freedesktop.Hal"
           send_interface="org.freedesktop.Hal.Device.Volume.Crypto"/>
    <allow send_destination="org.freedesktop.Hal"
           send_interface="org.freedesktop.Hal.Device.WakeOnLan"/>

  </policy>

 <policy group="power">
   <allow send_interface="org.freedesktop.Hal.Device.SystemPowerManagement"/>
   <allow send_interface="org.freedesktop.Hal.Device.LaptopPanel"/>
 </policy>

 <policy group="storage">
   <allow send_interface="org.freedesktop.Hal.Device.Volume"/>
   <allow send_interface="org.freedesktop.Hal.Device.Volume.Crypto"/>
 </policy>

</busconfig>

/etc/PolicyKit/PolicyKit.conf

<?xml version="1.0" encoding="UTF-8"?> <!-- -*- XML -*- -->

<!DOCTYPE pkconfig PUBLIC "-//freedesktop//DTD PolicyKit Configuration 1.0//EN"
"http://hal.freedesktop.org/releases/PolicyKit/1.0/config.dtd">

<!-- See the manual page PolicyKit.conf(5) for file format -->

<config version="0.1">

<match action="org.freedesktop.hal.storage.mount-removable">
  <match user="root">
    <return result="yes"/>
  </match>
  <match user="harris">
    <return result="yes"/>
  </match>
</match>

<match action="org.freedesktop.hal.storage.mount-fixed">
  <match user="root">
    <return result="yes"/>
  </match>
  <match user="harris">
    <return result="yes"/>
  </match>
</match>

</config>

/usr/share/PolicyKit/policy/org.freedesktop.hal.storage.policy

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policyconfig PUBLIC
 "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
 "http://www.freedesktop.org/standards/PolicyKit/1.0/policyconfig.dtd">

<!--
Policy definitions for HAL's drives/media mechanims.

Copyright (c) 2007 David Zeuthen <david@fubar.dk>

HAL is licensed to you under your choice of the the Academic Free
License Version 2.1, or the GNU General Public License version 2. Some
individual source files may be under the GPL only. See COPYING for
details.
-->

<policyconfig>

  <action id="org.freedesktop.hal.storage.mount-fixed">
    <description>Mount file systems from internal drives.</description>
    <message>System policy prevents mounting internal media</message>
    <defaults>
      <allow_inactive>no</allow_inactive>
      <allow_active>auth_admin_keep_always</allow_active>
    </defaults>
  </action>

  <action id="org.freedesktop.hal.storage.mount-removable">
    <description>Mount file systems from removable drives.</description>
    <message>System policy prevents mounting removable media</message>
    <defaults>
      <allow_inactive>yes</allow_inactive>
      <allow_active>yes</allow_active>
    </defaults>
  </action>

  <action id="org.freedesktop.hal.storage.unmount-others">
    <description>Unmount file systems mounted by other users.</description>
    <message>System policy prevents unmounting media mounted by other users</message>
    <defaults>
      <allow_inactive>no</allow_inactive>
      <allow_active>auth_admin_keep_always</allow_active>
    </defaults>
  </action>

  <action id="org.freedesktop.hal.storage.eject">
    <description>Eject removable media.</description>
    <message>System policy prevents ejecting removable media</message>
    <defaults>
      <allow_inactive>no</allow_inactive>
      <allow_active>yes</allow_active>
    </defaults>
  </action>

  <action id="org.freedesktop.hal.storage.crypto-setup-fixed">
    <description>Set up decryption for encrypted fixed storage devices.</description>
    <message>System policy prevents accessing encrypted fixed media</message>
    <defaults>
      <allow_inactive>no</allow_inactive>
      <allow_active>auth_admin_keep_always</allow_active>
    </defaults>
  </action>

  <action id="org.freedesktop.hal.storage.crypto-setup-removable">
    <description>Set up decryption for encrypted removable storage devices.</description>
    <message>System policy prevents accessing encrypted removable media</message>
    <defaults>
      <allow_inactive>no</allow_inactive>
      <allow_active>yes</allow_active>
    </defaults>
  </action>

</policyconfig>

/etc/fstab

# 
# /etc/fstab: static file system information
#
# <file system>        <dir>         <type>    <options>          <dump> <pass>
none                   /dev/pts      devpts    defaults            0      0
none                   /dev/shm      tmpfs     defaults            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

UUID=5dfdafa0-1268-4b5a-9901-0714929f8674 /boot ext2 defaults 0 1
UUID=cd8aac23-3f80-4320-afb6-3685c95ea357 /     ext4 defaults 0 1
UUID=dc8c641e-82d5-405d-8240-a3382c0176cb swap  swap defaults 0 0
UUID=f5546047-5431-4992-90bf-317251e4e8ad /home ext4 defaults 0 1

Offline

#2 2009-08-24 01:38:26

neddie_seagoon
Member
Registered: 2009-08-23
Posts: 121

Re: Unable to read or modify data on external USB hard drive.

What filesystem is your drive formatted as? If ntfs, you will likely need to install ntfs-3g and mount it as type ntfs-3g. If it's an extX filesystem, try mounting it manually, possibly adding -o rw to the mount options if defaults doesn't allow you to write.

Offline

#3 2009-08-28 06:49:11

Sirrah
Member
Registered: 2009-05-16
Posts: 22

Re: Unable to read or modify data on external USB hard drive.

neddie_seagoon wrote:

What filesystem is your drive formatted as? If ntfs, you will likely need to install ntfs-3g and mount it as type ntfs-3g. If it's an extX filesystem, try mounting it manually, possibly adding -o rw to the mount options if defaults doesn't allow you to write.

How do I manually mount a drive that automounts?

(I know, I'm a noob).

Offline

#4 2009-08-28 06:54:56

neddie_seagoon
Member
Registered: 2009-08-23
Posts: 121

Re: Unable to read or modify data on external USB hard drive.

Sirrah wrote:

How do I manually mount a drive that automounts?

As root:

ntfs-3g /dev/sdX /mnt/mountpoint
or
mount -t ntfs-3g /dev/sdX /mnt/mountpoint

http://wiki.archlinux.org/index.php/NTFS_Write_Support

You can also pass other options to mount: (in this example drive is ext3)
mount -t ext3 -o user,rw,async /dev/sdX /mnt/mountpoint

check man mount for all the details.

Offline

Board footer

Powered by FluxBB