I m using Ubuntu 12.04 and i have to partitions part1 and part2, both are ext4. I want to transfer media files to and from them freely through programs.
What I would do is the following:
Assuming you have both partitions mounted with the names part1 and part2, you will be the only one using them and you want total free control over them, I would do this:
sudo chmod 777 /media/part1 - This would give all permissions (Read, Write, Execute) to you within the part1 partition.
sudo chmod 777 /media/part2 - This would give all permissions (Read, Write, Execute) to you within the part2 partition.
The permissions (in this case 777) are as follow:
7 - Full (Read, Write & Execute)
6 - read and write
5 - read and execute
4 - read only
3 - write and execute
2 - write only
1 - execute only
0 - none
The first 7 (Starting from the Left) is for the owner, the 2nd is for the group where the owner resides. The last 7 is for other groups. Basically like this you can copy anything you want in the partitions and if you ever need to take the HDD out and connect it to another computer with Ubuntu you will not have any problems with permissions. At least in my case it saves me time because I tend to have 1 or 2 hard drives that hold movies, music and similar stuff and I move them around from PC to PC.
Just to add, if you do not know where the partitions are mounted, you can always open Disk Utility and in the information about the hard drive it will tell you where it is mounted. Remember that you need to apply this to the partition AFTER it has been mounted.
Instead of changing all file permissions, like Luis Alvarado suggested, it would be better to change the file owner - thus keeping the executable bit on any binary and script files that previously had it.
So, assuming your partition is mounted as /media/something and your username is johndoe, you can run
sudo chown -R johndoe:johndoe /media/something
to change the owner and owning group of /media/something (and all files and directories it contains, hence the -R for 'recursive') to johndoe.
This way, all files will retain their permissions, but since you will be the owner of /media/something, you will be able to write to it and change any file permissions, in case you ever need to.
You should be able to mount the partition from nautilus (Ubuntu's default file manager). If you look at the top left hand side of the window, you should be able to see all of the partitions you have on your drive. Just click on one to mount it.
However, if you want a given directory to always be mounted on startup, you need to add it to
/etc/fstab. The line that you would add should be something like:
/dev/sda2 /media/part1 ext4 defaults 0 0
The format is
device (tab) mount point (tab) type (in your case ext4) (tab) options (probably "defaults") (tab) dump (tab) pass (probably both 0 in your case)
So basically just replace /dev/sda2 with your device and /media/part1 with your mount point from the example.
If you need more info for editing your /etc/fstab, you could check out this article I found: http://www.tuxfiles.org/linuxhelp/fstab.html.
You can normally do this already, but my advice would be to add the partitions to
/etc/fstab so they will be stable and have a location of your choosing. You can mount them at any existing directory, but conventions seem to be to mount it at
/mnt. To do this, follow these steps:
Create the directories under
/mnt; the directories can be whatever name you choose. I will simply use "MyMount1" and "MyMount2" for an example. Also, I will use "mylogin" to represent your login name and group; change this to your login account name.
sudo mkdir /mnt/MyMount1 sudo mkdir /mnt/MyMount2 sudo chown mylogin:mylogin /mnt/MyMount1 sudo chown mylogin:mylogin /mnt/MyMount1
You now have the two directories created, with you as the owner.
You need the UUID (Universal Unique Identifier) of the two drives to identify them in the fstab file. To get these, run
sudo blkid from a terminal commandline and find the partitions you want to use. The easiest way to use them will be to copy and paste from the terminal to the file.
/etc/fstab using a text editor such as gedit. To use gedit, enter
gksu gedit /etc/fstab
Then, enter these two lines at the end of the file (but substitute the UUID for the xxx.... part, and the directory name for MyMounts):
UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx /mnt/MyMount1 ext4 defaults 0 2 UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx /mnt/MyMount2 ext4 defaults 0 2
To test, save the file and enter this at a terminal commandline:
sudo mount -a; if there are any errors that you can't understand, ask here. If there are errors and you need to reboot, it may be safest to disable the added lines first by prefixing the line with a pound sign (#) which makes it a comment.