Results 1 to 7 of 7

Thread: [SOLVED] HDD access permissions

  1. #1
    Join Date
    Aug 2008
    Location
    Jawja
    Beans
    2,486
    Distro
    Ubuntu 13.04 Raring Ringtail

    [SOLVED] HDD access permissions

    Here is the deal:

    I have a 40 gig drive that I was using for backup purposes under Windows XP. I have switched to Ubuntu. I reformatted the drive (sdb) to ext2. Now I cannot write to the drive. I find no way to change the permissions since I am not the root. I tried several things after reading about "chmod" and commanded read/write permission to all. That command seemed to be accepted but when I go to "Computer" to access the drive I still only have read permission.

    The drive, after formatting, has a "lost-found" directory. Where does that come from? When I try to look in the directory I am not allowed access. I tried to log on as root but cannot. It seems that is the only way in. I have used "sudo" and can "cd" to the drive. That was how I was able to enter R/W commands. I also rebooted the system but no luck. I have also lost R/W access to a second drive where I have the Ubuntu 64 bit loaded. I have the same problem in there also.

    This is getting frustrating. I like Ubuntu, despise Windows, but with all of the little issues that come up I am about to trash it all and put up with XP. I am a newbie and am trying to learn but I do have other things to do besides sit here all day.

  2. #2
    Join Date
    Feb 2007
    Location
    Yorkshire, UK
    Beans
    658
    Distro
    Ubuntu 8.10 Intrepid Ibex

    Re: HDD access permissions

    When you formatted the drive with gparted, you had to enter your password to log on as root. Therefore by default the drive is owned by root.

    You can change this easily if you know where the drive is mounted, or the name of the drive.

    If you open a terminal and...

    sudo fdisk -l

    (Note: that's a lower-case L.)

    ... you should see your new drive. Let's say it's at /dev/sdb1

    Then...

    sudo chown -R username:username /dev/sdb1

    Please make sure you have identified the correct drive!

    That will make you the owner of the drive and all the files on it.

    P.S. The Lost & Found folder is where the system puts any lost files following a disk check. You can ignore it.
    Last edited by silkstone; August 23rd, 2008 at 07:34 PM.
    Before you criticise someone, walk a mile in their shoes. Then, when you do criticise them, you're a mile away and have their shoes.

  3. #3
    Join Date
    Aug 2008
    Location
    Jawja
    Beans
    2,486
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: HDD access permissions

    I did the fdisk and know that info. The drive is not new except in the sense of now being formated ext2. the problem began after the formatting. I was able to R/W prior to that.

    "sudo chown -R username:username /dev/sdb1"
    The "username:username" part, will I enter just the name (ie ... ralph:ralph) in both places or is there something else? Ralph is not my name and no offense intended to all of the Ralph's out there!

    I did the command with username:username and it returned no errors. but I still have no access to R/W. Will I need to reboot?

    The fdisk info on the drive is:
    Disk /dev/sdb: 40.0 GB, 40020664320 bytes
    255 heads, 63 sectors/track, 4865 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x9b230d97

    Device Boot Start End Blocks Id System
    /dev/sdb1 1 4865 39078081 83 Linux

    What say you?
    Last edited by 73ckn797; August 23rd, 2008 at 07:47 PM.

  4. #4
    Join Date
    Feb 2007
    Location
    Yorkshire, UK
    Beans
    658
    Distro
    Ubuntu 8.10 Intrepid Ibex

    Re: HDD access permissions

    Sorry - yes you have to either unmount and remount the drive, or reboot for the new ownership to take effect.

    Substituting your real username for 'username' should have worked!
    Before you criticise someone, walk a mile in their shoes. Then, when you do criticise them, you're a mile away and have their shoes.

  5. #5
    Join Date
    Mar 2006
    Location
    Williams Lake
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: HDD access permissions

    You probably won't be able to change ownership of your hard drive, but you can change the permissions of your mount point for example if you drive is mounted on /media/backups then you would issue the command:

    Code:
    sudo chmod -R 777 /media/backups
    after you have mounted /dev/sdb1 eg:

    Code:
    sudo mount /dev/sdb1 /media/backups
    Jim

  6. #6
    Join Date
    Aug 2008
    Location
    Jawja
    Beans
    2,486
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: HDD access permissions

    I have tried all options given and nothing is working. Since I did all of that my internet will not work on the desktop. I made certain that all commands were exactly typed. I did fail to mention that when I initiallY went to format the drive to ext2 it displayed an error and after that the Lost-found directory appeared every time I tried to format it. MaKes me thinks it has a bad sector. It seemed to get very noisy when formatting to ext2 but not back to NTFS. Go figure that!! I will run disk check on it.

    I booted the system with the Ubuntu LiveCD and reformatted the /dev/sdb back to NTFS and can now read and write with no problems. It got to where Ubuntu would not give me the option of a NTFS format.

    I tried all options for the internet but nothing worked. I removed the ethernet card and connected into the MOB LAN and the internet connects. Guess that the card died while fooling with the other stuff.

    Goes to show that if something ain't broke, don't fix it. Being a 33 year auto tech should have made me apply that to my desktop computer.
    Last edited by 73ckn797; August 23rd, 2008 at 10:26 PM.

  7. #7
    Join Date
    Nov 2008
    Beans
    1

    Re: [SOLVED] HDD access permissions

    Quote Originally Posted by 73ckn797 View Post
    Here is the deal:

    I have a 40 gig drive that I was using for backup purposes under Windows XP. I have switched to Ubuntu. I reformatted the drive (sdb) to ext2. Now I cannot write to the drive. I find no way to change the permissions since I am not the root. I tried several things after reading about "chmod" and commanded read/write permission to all. That command seemed to be accepted but when I go to "Computer" to access the drive I still only have read permission.

    The drive, after formatting, has a "lost-found" directory. Where does that come from? When I try to look in the directory I am not allowed access. I tried to log on as root but cannot. It seems that is the only way in. I have used "sudo" and can "cd" to the drive. That was how I was able to enter R/W commands. I also rebooted the system but no luck. I have also lost R/W access to a second drive where I have the Ubuntu 64 bit loaded. I have the same problem in there also.

    This is getting frustrating. I like Ubuntu, despise Windows, but with all of the little issues that come up I am about to trash it all and put up with XP. I am a newbie and am trying to learn but I do have other things to do besides sit here all day.
    i have the same problem to this i have tryed every thing when i tryed sudo chown -R sam@sam/dev/sda5

    it says sam@sam-laptop:~$ sudo chown -R sam:sam/dev/sda3
    chown: missing operand after `sam:sam/dev/sda3'

    can ya help please

    sam

Bookmarks

Posting Permissions

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