Changing permissions on external and internal hard disk
Hello,
I am brand new to Linux and extremely frustrated. I bought a new computer Boxing Day and trying to set it up as a Myth TV box and entertainment centre but nothing seems to work correctly (at least not the 1st, 2nd or 3rd try). I've install Ubuntu 12.04 (to dual boot with Windows 8, now that was a nightmare) and MythTV and I am trying to add more storage. This is my latest frustration. I've reformatted my external hard drive as ext4 and I've created a new partition on the internal hard drive (also ext4) but I can't access them because they have been assigned to the root and I have no permissions. I would like to create directories on those drives to store various media but Ubuntu won't let me do anything with them. I don't understand a word the say on Ask Ubuntu (they assume in depth knowledge there) and when I try it anyway, I usually end up screwing up my computer (I've had reinstalled Ubuntu three times now and had to repair the boot sequence about 5 times). Thank you in advance for any help. |
Do you mean the hard drive is now blank and formatted to ext4 (no Win8 or Ubuntu1204 on it)?
If so and you want it dual booting I believe you have to install Windows first, the installer should give you the opportunity to repartition the drive and reformat. If you will be partitioning it GPT leave 4MB unallocated in the beginning of the drive, then start the Windows Partition, leave 1MB unallocated between the Windows and (future) Ubuntu partition, and at least 1MB unallocated at the end of the drive, if partitioning MBR then 1MB is plenty at the beginning of the drive. Make sure you leave plenty of room unallocated for the Ubuntu install. Once Win8 is installed then install Ubunutu "side-by-side" (dual booting). When Ubuntu starts install it will open a partition manager, best ot run it manually (imo), you'll want tow partitions if MBR but if GPT you'll need 3, the first will be BIOS-GRUB, second will be "/" (no quotes, this is the root partition where all the essential OS stuff installs) the 3rd will be "/home" (this will be your home where you can set up working directories you dont need to set up in root such as for Myth TV, (Linux version of Windows "My Documents" only way better imo)) then complete the install follow the install directions. I'm actually giving directions for WinXP dual boot with Ubuntu 11.04, I have no expereince with Win8 so am told there are some differences. What about a full install of Ubuntu, then install VirtualBox app in Ubuntu and install Win8 in VirtualBox? with a new pc it should handle it fine. I run WinXP in virtualbox on LinuxMint 13 Xfce (ubuntu) and the Google TV finds it and the Windows media shares with no problem. |
Quote:
Here is a great site with detailed tutorials on dual booting Windows with Ubuntu: http://members.iinet.net/~herman546/ Those tutorials are for Windows 7, but they should work just as well with Windows 8. Quote:
As for the permissions on the problematic partitions, you can use the commands chown to change the ownership of the partitions, and you can use chmod to change the permissions. Post the output of Code:
sudo fdisk -l |
Thank you, I have already manged to install Ubuntu 12.04 beside Windows 8 but please understand - it is not just like installing beside Windows 7 and XP. Windows 8 is installed under a new UEFI system designed to stop anything other than windows 8 from installing itself on the computer. In order to bypass it you have to go into the BIOS and disable secure boot (which is discouraged by by a big red warning box) and once that is disabled you have to activate legacy systems so that the computer will look to your DVD drive to boot sources. You then have to disable windows 8 boot manager under (or at least move it below the DVD Drive in boot order) in order to access your boot disk.
That did take time but I have to admit that much of my troubles stem from the fact that I first mistakenly loaded Ubuntu 12.10 which doesn't play well with Myth TV so I had to uninstall that in order to load 12.04. This involved reformatting partitions on the hard drive which in turn corrupted the grub and I was confronted with "grub rescue" the next time I booted up my computer. Anyway, I sorted that all out but most recently I encountered grub rescue again when I reclaimed the greater portion of the C: drive which has all the windows system files on it. But I digress. In answer to your question, below is the output from sudo fdisk -1. It looks like there is a problem with my partition tables I'm going to have do something about (I will probably need help with that too). Also it isn't showing all my partions (probably the same problem) so I've also added the output to sudo blkid. The disks I want permission for are: /dev/sda6: UUID="3e038c56-47f5-4884-8c2d-7d4d6d84d28a" TYPE="ext4" and /dev/sdf1: UUID="8c4794be-5c49-4f1e-a318-e4b11c0b7117" TYPE="ext4" Thanks Again OUTPUTS fdisk -l WARNING: GPT (GUID Partition Table) detected on '/dev/sdf'! The util fdisk doesn't support GPT. Use GNU Parted. WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted. Disk /dev/sda: 1000.2 GB, 1000204886016 bytes 255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk identifier: 0x70cb1613 Device Boot Start End Blocks Id System /dev/sda1 1 1953525167 976762583+ ee GPT Partition 1 does not start on physical sector boundary. WARNING: GPT (GUID Partition Table) detected on '/dev/sdf'! The util fdisk doesn't support GPT. Use GNU Parted. Disk /dev/sdf: 500.1 GB, 500107862016 bytes 255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000 Device Boot Start End Blocks Id System /dev/sdf1 1 976773167 488386583+ ee GPT sudo blkid Device Boot Start End Blocks Id System /dev/sdf1 1 976773167 488386583+ ee GPT chris@Server:~$ sudo blkid /dev/sda1: LABEL="Windows RE tools" UUID="8046E66C46E66300" TYPE="ntfs" /dev/sda2: LABEL="SYSTEM" UUID="CA28-48E8" TYPE="vfat" /dev/sda4: LABEL="OS" UUID="6CBA8289BA82500E" TYPE="ntfs" /dev/sda6: UUID="3e038c56-47f5-4884-8c2d-7d4d6d84d28a" TYPE="ext4" /dev/sda7: UUID="e6cd4226-01cb-412c-900f-4f05e41f1acb" TYPE="swap" /dev/sda8: LABEL="Recovery Image" UUID="AA3CC9A73CC96EBF" TYPE="ntfs" /dev/sda9: LABEL="Internal" UUID="360e7eb6-6f04-4703-95cb-3d2e71e8b3f4" TYPE="ext4" /dev/sdf1: UUID="8c4794be-5c49-4f1e-a318-e4b11c0b7117" TYPE="ext4" |
Just chown/chmod the mount location if you want regular users to have access to the new drive.
|
Did I mention I'm a Newbie?
|
as root, or via sudo as you are running Ubuntu issue the following commands:
Code:
[ray@centos ~]$ df -Th Code:
Filesystem Type Size Used Avail Use% Mounted on Now sda6 and 9 along with sdf1 are formatted ext4, those we can start with. I am going to guess that sda9 is the partition you formatted internally and sdf1 is the external drive. First step, assuming my guess above is correct, is to create a mount point for those devices. Code:
#mkdir /path/to/mount/point ex: Code:
mkdir /mnt/internal Now chmod/chown them so that any user can access them. You have a few options here. 1. make it so they are owned by a specific user. This is best practice. 2. make it so they are universally accessible by ANYONE. Not best practice, but if you are secure that no one from the outside world is going to have easy access to the data, then it is safe enough. option 1 Code:
chmod -Rf 755 /mnt/internal option 2 Code:
chmod -Rf 4777 /mnt/internal ***note, you will need to do the same thing for sdf1. Next step is to mount and test that you have the desired access. Code:
# mount -t ext4 /dev/sda9 /mnt/internal ***note, again all of this will need to be performed as root or via sudo, the normal user in linux does not have the privileges to perform these tasks, nor should he. hope that helps. |
Thanks lleb, This is much more helpful.
There is a lot here so I'll have to try this, this evening. A few questions though. 1) I entered "df -Th" and got the readout below. It looks like the system can't see the windows partions or my sda9 (or something). Does that matter with respect to your instructions? I formatted these drives with GParted (which still tells me the external drive is ext4). Filesystem Type Size Used Avail Use% Mounted on /dev/sda6 ext4 56G 7.0G 46G 14% / udev devtmpfs 4.6G 4.0K 4.6G 1% /dev tmpfs tmpfs 1.9G 896K 1.9G 1% /run none tmpfs 5.0M 0 5.0M 0% /run/lock none tmpfs 4.6G 80K 4.6G 1% /run/shm /dev/sda2 vfat 356M 37M 320M 11% /boot/efi /dev/sdf1 ext4 459G 198M 435G 1% /media/8c4794be-5c49-4f1e-a318-e4b11c0b7117 2) Also, do you think I should be concerned with the warning from my fdisk readout? WARNING: GPT (GUID Partition Table) detected on '/dev/sdf'! The util fdisk doesn't support GPT. Use GNU Parted. 3) Finally is the first command you gave (i.e. #mkdir /path/to/mount/point) real or is it just to illustrate format? The reason I'm confused about this is because your examples are somewhat different (i.e. mkdir /mnt/internal: No # sign and no path entered). Sorry but I'll fall back on the "I'm a Newbie" excuse as long as I can. Anyway, thanks again. I have to leave now so I'll have a go at it tonight. |
In answer to your questions
1) df only reports partitions that are currently mounted. If the drive exists but is not mounted, then df will not show it. The reason lleb asked you to post the output is not so we could see the new drives you want to mount, but so that we could see which of the drives listed in your fdisk -l output are the system drives (/dev/sda6 and /dev/sda2, which you can see in your df command) and which are the new drives you want to mount. 2) That is fine. Drives with >2TB partitions require the GPT partition table, which fdisk does not support. fdisk will still show you information about the drive, but it cannot be used to do partitioning, you have to use parted for that. 3) Some users here put # or $ symbols before the command to represent the command prompt at the shell, it's not part of the actual command. Obvious the "/path/to/mount/point" isn't real, you need to replace that with the actual path where you want to mount the drive, but that's all. |
suicidaleggroll got it on the head. the # is to represent you are issuing the command as root, not as user. see my notes above about all of those commands needing to be performed by root, or via sudo, not as user.
|
Quote:
|
Mount the external drive before using chown and chmod on the mount point.
|
Sucess! Thank you one and all.
|
glad it worked. please mark thread as [SOLVED] please.
|
All times are GMT -5. The time now is 09:32 AM. |