Find the answer to your Linux question:
Results 1 to 4 of 4
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    permission denied with and USB hard drive


    I'm working on this problem since one week now and this is driving me crazy :/

    So, I've finally decided to cry for help

    Here is the problem:

    I have an USB external drive of 250 Gb. There are 2 NTFS partitions on it. When I plug the USB in, Mandriva (2005 LE) recognizes it and automount it automatically .

    However when I try to access it (as a regular user) it says : permission denied. But I can access it without any problem when I'm root.

    Here is the content of my /etc/fstab (generated automatically by Mandriva):
    /dev/sdb1               /mnt/removable          ntfs    pamconsole,exec,noauto,utf8,iocharset=iso8859-1,managed 0 0
    /dev/sdb2               /mnt/removable1         ntfs    pamconsole,exec,noauto,utf8,iocharset=iso8859-1,managed 0 0
    I know that I normally should modify the /etc/fstab file to allow regular users to access the drive (adding 'user' on the preceding lines). However that won't work (as a matter of fact I tried several times ) because this file is modified automatically by Mandriva.

    Here are the many things I tried without any luck

    1. adding the 'user' param to the file /etc/fstab and then "freeze" it so that no one can modify it (using "chattr +i /etc/fstab" when being root).
    That didn't work because at the next reboot, Mandriva don't automount the drive then. And as a side effect, I couldn't use my other usb keys when I did that.

    2. changing the parameters of the drive using HardDrake. This one work temporarily but again at the next reboot Mandriva don't seem to remember the parameters and I have to do that each time.

    3. I tried several other things (to long to mention it) and always without any success.

    So, any help would be GREATLY accepted as I'm feeling a little depressed right now :'(

    Thanks in advance,

  2. #2
    Just Joined!
    Join Date
    Aug 2005
    Having similar problems myself. My Mandriva won't even mount the drive though. So, you're one up on me.

  3. #3
    The culprit is HAL which mounts automatically your USB drive as a NTFS disk with no permission at all except for root.

    To prevent that, you need to add this file in
    ------------------- cut here ----------------------------
    <?xml version="1.0" encoding="ISO-8859-1"?>

    <deviceinfo version="0.2">

    <match key="volume.fstype" string="ntfs">
    <merge key="volume.policy.mount_option.umask=0" type="bool">true</merge>

    -------------------- cut here ---------------------

    You can name this file whatever name suits your taste (I chose ntfs.fdi).

    This rule makes a NTFS partition to be mounted with all access rights to everybody. But as HAL adds the option "-ro" too, you can't write to your disk which is preferable as writing in NTFS partition from Linux is not well tested yet.

    Hope this helps.

    [EDIT] For Hal to take into account your added file, you need to reboot or execute:
    sudo /etc/init.d/haldaemon restart

  4. $spacer_open
  5. #4
    Linux Guru bigtomrodney's Avatar
    Join Date
    Nov 2004
    If you get it working with that HAL policy just remember Mandriva does not write to NTFS at all - even if you can turn it on I would not recommend it. If you can best thing to do is format it as FAT32, then it can be shared between Windows and Linux.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts