Plain ol' hard drive question
I have been trying to figure this out for a couple of days. I can partition, mount, resize, read, etc. to a couple of hard drives, but I don't have access to it. I can't write, copy, etc. I am running Kubuntu, and also tried the newest version of Knoppix, but neither seems to let me. I tried using commands, but I don't really know what it is I'm supposed to do. One of the drives was NTFS, and I switched it to ext3, and everything looks right, but the other I just bought today, and I don't have access to it, either.
If someone could please help, I would be grateful. Thanks, |
What does:
fdisk -l look like, when run as root? Chris |
It looks like this:
Disk /dev/hda: 80.0 GB, 80026361856 bytes 255 heads, 63 sectors/track, 9729 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/hda1 * 1 9352 75119908+ 83 Linux /dev/hda2 9353 9729 3028252+ 5 Extended /dev/hda5 9353 9729 3028221 82 Linux swap / Solaris Disk /dev/sda: 160.0 GB, 160041885696 bytes 255 heads, 63 sectors/track, 19457 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 1 2101 16876251 83 Linux /dev/sda2 2102 7200 40957717+ 83 Linux /dev/sda3 7201 11025 30724312+ 83 Linux /dev/sda4 11026 19457 67730040 83 Linux Disk /dev/sdb: 400.0 GB, 400088457216 bytes 255 heads, 63 sectors/track, 48641 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sdb1 1 48641 390708801 83 Linux |
Knoppix mounts disks read only for safety - can be remounted in need.
As for Kubuntu, that sounds odd - let's also see /etc/fstab |
I couldn't get that to work. I tried that yesterday, and again just now. Here are the results.
garren@garren:~$ /etc/fstab bash: /etc/fstab: Permission denied garren@garren:~$ sudo /etc/fstab Password: sudo: /etc/fstab: command not found |
/etc/fstab is a configuration table and not executable. Use cat /etc/fstab.
If the partition on the drive is mounted, also post the long listing of the partition. For example, if you have it mounted on /mnt/data, the use: ls -ld /mnt/data. For the ext3 filesystem, you can use chown, chgrp and chmod on the mounted partition to change the permissions. If you want exclusive access, then you can change the ownership and permissions to the same as your home directory uses. You can even have it mounted on a directory inside your home directory. |
Here is the listing of /etc/fstab. Thanks for the clarification of that.
# /etc/fstab: static file system information. # # <file system> <mount point> <type> <options> <dump> <pass> proc /proc proc defaults 0 0 # /dev/hda1 UUID=e72abf9c-6ca1-4979-b2c2-260e03552051 / ext3 nouser,defaults,errors=remount-ro,atime,auto,rw,dev,exec,suid 0 1 # /dev/hda5 UUID=5c7f4430-d80f-4572-a89c-16c8aabe05cd none swap sw 0 0 /dev/hdc /media/cdrom0 udf,iso9660 user,atime,noauto,rw,dev,exec,suid 0 0 /dev/hdd /media/cdrom1 udf,iso9660 user,atime,noauto,rw,dev,exec,suid 0 0 /dev/ /media/floppy0 auto user,atime,noauto,rw,dev,exec,suid 0 0 /dev/hdb1 /music ntfs uid=1000,gid=0,auto,rw,users 0 0 /dev/sda5 <mount\040point> swap noauto 0 0 /dev/sda1 /sda1 auto nouser,atime,noauto,rw,nodev,noexec,nosuid 0 0 /dev/sda2 /Music auto nouser,atime,noauto,rw,nodev,noexec,nosuid 0 0 /dev/sda3 /New\040Folder auto users,atime,noauto,rw,nodev,noexec,nosuid 0 0 /dev/sda4 /Charmed auto nouser,atime,noauto,rw,nodev,noexec,nosuid 0 0 /dev/sdb1 /400\040g auto nouser,noauto,atime,rw,nodev,noexec,nosuid 0 0 Here is a listing of one of the partitions that I have mounted. drwxr-xr-x 2 root root 4096 2007-01-06 17:25 /sda1 |
I have a very similar problem: Edgy can't write to certain folders an a SATA hard disk, while Mandriva and Winblows can. I used to have found the solution on another machine, but, shame on me, I forgot where I found the answer. All I remember is it was some magic incantation of chmod. Well, now I found it again!
Maybe it helps |
That worked!
The command was: sudo chmod a+w -R /home/Storage Thanks to everyone for their help. Garren |
Storage wasn't listed in your /etc/fstab file. You haven't indicated the filesystem used. If it is vfat or smbfs or cifs, then you can't use chmod or chown or chgroup on the mounted partition.
If it is ext3 for example, you could use "chown yourusername:yourgroupname /mountpoint" to make yourself the owner. |
@jschiwal
Well, correct, but that wasn't the problem. My Fat32 partition was correctly listed in fstab and mtab, but I still couldn't write to some folders because I apparently had no permissions (Fat32 doesn't know permissions!!!). I never changed anything to the two configuration files, after the chmod command the drive just worked as expected. |
All the permissions for files and folders on a fat32 partition, unless otherwise stated in fstab, will be set to allow only the user that mounted the partition. If it automounts as you boot your machine, that'll be root, so you wouldn't be able to modify that partition. You can modify the mounting behaviour by editing fstab. Check out the man page for all the options.
|
All times are GMT -5. The time now is 07:34 PM. |