Find the answer to your Linux question:
Results 1 to 10 of 10
has anyone come across permission problems when trying to mount SCSI external drives? I bought a 1TB external hard drive and configuring it on my windows partition first (dual-boot laptop) ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie
    Join Date
    Jan 2004
    Location
    UK
    Posts
    131

    [SOLVED] re.: SCSI external HD


    has anyone come across permission problems when trying to mount SCSI external drives?

    I bought a 1TB external hard drive and configuring it on my windows partition first (dual-boot laptop) I discovered that those big external storage use SCSI technology - then I booted Slackware12.2 and wrote the /etc/fstab as follow:
    /dev/sda1 /mnt/hd auto noauto,user 0 0

    and I noticed that despite me being able to mount the disc as 'user' , i can only read or write in it if i'm logged in as 'root' (not even being the 'super user' by running 'su') - I have run 'chmod -R namedir/file' but still not able to write to the disc - if i take a look at eh permission for it, I get:

    drwxr-xr-x 2 root root 4096 2002-03-16 07:34 hd (when partition is umounted)

    then i mount the partition and this is what happens:

    drwx------ 1 root root 4096 2009-01-22 00:25 hd (partition mounted)

    I thought that it was because I was mounting the disc on a dir that belonged to 'root' (/mnt/hd), so i created my own dir on my own partition and still the same problem -

    is this something peculiar of SCSI drives? I reckon that i have done that needs be done in terms of permission - any ideas?

    thnks
    If you get on the wrong train all the stations you will come to will be the wrong stations.
    Zen

  2. #2
    Linux Engineer Freston's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    1,049
    Hmm, If you can't mount a device as user, usually that is because you're not member of the plugdev group. Another reason could be that you mount the device thus:
    (as user) /mount /dev/sda1 /mnt/hd
    This wont work. A peculiarity in the mount program pulls the emergency brake.

    You either:
    Code:
    (as user) /mount /dev/sda1
    --or--
    (as user) /mount /mnt/hd
    And the mount program looks up in fstab what to mount or where.

    The permissions on the mount points are not really important. In your above example, I take it you mounted the device as root. This makes root the owner of the device.
    Can't tell an OS by it's GUI

  3. #3
    Linux Newbie
    Join Date
    Jan 2004
    Location
    UK
    Posts
    131
    hi freston,
    not sure I understand you... or maybe it's my fault cos i didnt make myself clear. I can mount the external hard-drive both as 'user' and as 'root', but when I mount it as user I can't write the directory (where I have mounted the device, in my case /mnt/hd ) - I know how to fiddle with the /etc/fstab file and I know that the line I have for the device is pretty much right, regardless; so i was just wondering if this happens only cos the HD is a SCSI device, and if so, is there a way around it?
    If you get on the wrong train all the stations you will come to will be the wrong stations.
    Zen

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru
    Join Date
    Nov 2007
    Posts
    1,760
    A) No - they are not SCSI HDD's. USB connections fall under the SCSI driver in Linux. And all HDD's are listed as /dev/sdX with newer kernels (regardless if HDD is SCSI, IDE, or SATA.)

    B) No - your permission issue has to do with how you are mounting it. If you want the volume to be writeable by any user, you can mount with the umask=0 option.

    Code:
    mount -o umask=0 /dev/sda1 /mnt/hd

  6. #5
    Linux Newbie
    Join Date
    Jan 2004
    Location
    UK
    Posts
    131
    thanx a lot HROAdmin26 - believe it or not I logged in to say that I found the answer on the forum on an old thread, and it's similar to what you suggested - I have added the following to /etc/fstab:

    /dev/sda1 /mnt/hd ntfs rw,umask=0000,user,gid=users 0 0

    does it look similar to your advice? or is there a shorter / more correct way to add this to /etc/fstab?

    many thanks to all
    If you get on the wrong train all the stations you will come to will be the wrong stations.
    Zen

  7. #6
    Linux Newbie
    Join Date
    Jan 2004
    Location
    UK
    Posts
    131
    sorry! it seems that I have only solved half of the problem, and since I realized that i'm not so good at getting the permission right, i ask for help again

    now, this is what the line on my /etc/fstab looks like:

    /dev/sda1 /mnt/hd ntfs noauto,umask=000,user,gid=users 0 0

    so now i can mount and read /mnt/hd as user, but I still can't write on it (/mnt/hd) - any ideas why?

    thank you
    If you get on the wrong train all the stations you will come to will be the wrong stations.
    Zen

  8. #7
    Linux Guru
    Join Date
    Nov 2007
    Posts
    1,760
    *Guessing*

    You have an NTFS filesystem and are using a Linux NTFS driver that does not support (or is mounting read-only) writing to NTFS.

    Use the ntfs-3g module for read/write NTFS access.

  9. #8
    Linux Newbie
    Join Date
    Jan 2004
    Location
    UK
    Posts
    131
    I have changed the '/etc/fstab' line from

    /dev/sda1 /mnt/hd ntfs noauto,umask=000,user,gid=users 0 0

    to

    /dev/sda1 /mnt/hd ntfs-3g noauto,umask=000,user,gid=users 0 0

    and that is because I noticed that one of my partition line on /etc/fstab (win/slack dual-boot) is mounted as ntfs-3g - however, this partition is also not accessible as 'user' and can only write to it if i'm logged in as 'root'

    is that how i'm supposed to choose the ntfs-3g driver? if not, how do i choose the ntfs-3g driver? and why I CAN write to the nntfs device if i start X as root?

    very confused!
    If you get on the wrong train all the stations you will come to will be the wrong stations.
    Zen

  10. #9
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    Add this code in /etc/fstab file :
    Code:
    /dev/sda1   /mnt/hd   ntfs-3g   defaults,umask=0  0  0
    Execute mount -a command and all users will have read/write access in /mnt/hd.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  11. #10
    Linux Newbie
    Join Date
    Jan 2004
    Location
    UK
    Posts
    131
    thank you Super Moderator; it worked! and sorry for the late reply!
    If you get on the wrong train all the stations you will come to will be the wrong stations.
    Zen

Posting Permissions

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