Find the answer to your Linux question:
Results 1 to 5 of 5
Hi. I'm having trouble accessing an external usb hard disk. After plugging it in: Code: $ mount [extraneous output removed] /dev/sdb1 on /media/disk type ext2 (rw,nosuid,nodev,uhelper=hal) $cd /media/disk $ ls ...
  1. #1
    Just Joined!
    Join Date
    Jan 2008
    Posts
    4

    Can not access folders in a usb hdd: Permission denied

    Hi. I'm having trouble accessing an external usb hard disk. After plugging it in:

    Code:
    $ mount
    [extraneous output removed]
    /dev/sdb1 on /media/disk type ext2 (rw,nosuid,nodev,uhelper=hal)
    
    $cd /media/disk
    $ ls -l
    total 28
    drw-rw-rw- 273 ben ben  8192 2009-06-14 17:46 stuff
    drw--w--w-   2 ben ben 16384 2009-06-14 17:21 lost+found
    ben_AT_electron:/media/disk$ cd stuff/
    bash: cd: stuff/: Permission denied
    The account I am currently logged in on is "ben," as can be seen, i am the owner of this folder. Any idea?

    Thanks,
    -Ben

  2. #2
    Trusted Penguin Dapper Dan's Avatar
    Join Date
    Oct 2004
    Location
    The Sovereign State of South Carolina
    Posts
    4,562
    See if you can get in there with root privilages:
    Code:
    su
    Enter root's password, then:
    Code:
    cd stuff/
    EDIT: I'm assuming you're using straight Debian.
    Linux Mint + IceWM Registered:#371367 New Members: click here

  3. #3
    Just Joined!
    Join Date
    Jan 2008
    Posts
    4
    Yeah, works pefectly as root. "ben" is the owner of all the files in the directory and has read-write access to everything. Your assumption that i am using straight debian is correct.

  4. #4
    Trusted Penguin Dapper Dan's Avatar
    Join Date
    Oct 2004
    Location
    The Sovereign State of South Carolina
    Posts
    4,562
    Might have to do with the fact that /media itself needs root permission. It's been a while since using straight Debian so I'm guessing. At any rate, if root works, I'd just use it. My hunch is it has to do with how permissions are set up for /media/disk in /etc/fstab.
    Linux Mint + IceWM Registered:#371367 New Members: click here

  5. #5
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,316
    To access Linux filesystems, one has to give ownership of /media/disk folder to Regular user.
    Code:
    su -
    chown -R user_id:group_id  /media/disk
    Execute id command as Regular user to check user and group ids.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

Posting Permissions

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