unable to access other partitions of hard disk

Asked by Rinesh Mehta

i am currently operating exclusively on ubuntu 12.04. when i start my computer i go to home folder and there 2 partitions are shown to me. whne i click on any of the partition the massage shows you dont have permission to view the contents in the folder and then i close it when i reopen the home folder that particular partion gets disappered and same thing happens wiht another partition also.
following are the details abbout two partitions
device : /dev/sda2 /dev/sda4
partition type : linux swap (0*82) linux swap (0*82)
mount point :mounted at /media/documents mounted at /media/spare

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu util-linux Edit question
Assignee:
No assignee Edit question
Solved by:
N1ck 7h0m4d4k15
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

Can you give the output of:

sudo parted -l; lsb_release -a; uname -a

Thanks

Revision history for this message
Rinesh Mehta (rineshmehta) said :
#2

following is the output

No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 12.04.1 LTS
Release: 12.04
Codename: precise
Linux rinesh 3.2.0-29-generic-pae #46-Ubuntu SMP Fri Jul 27 17:25:43 UTC 2012 i686 i686 i386 GNU/Linux

Revision history for this message
Rinesh Mehta (rineshmehta) said :
#3

sorry previous one is wrong output
this one is correct

Model: ATA ST3500418AS (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
 1 32.3kB 100GB 100GB primary ext4 boot
 2 100GB 300GB 200GB primary ext4
 3 300GB 304GB 3504MB primary linux-swap(v1)
 4 304GB 500GB 197GB primary ext4

No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 12.04.1 LTS
Release: 12.04
Codename: precise
Linux rinesh 3.2.0-29-generic-pae #46-Ubuntu SMP Fri Jul 27 17:25:43 UTC 2012 i686 i686 i386 GNU/Linux

Revision history for this message
Rinesh Mehta (rineshmehta) said :
#4

sorry previous one is wrong output
this one is correct

Model: ATA ST3500418AS (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
 1 32.3kB 100GB 100GB primary ext4 boot
 2 100GB 300GB 200GB primary ext4
 3 300GB 304GB 3504MB primary linux-swap(v1)
 4 304GB 500GB 197GB primary ext4

No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 12.04.1 LTS
Release: 12.04
Codename: precise
Linux rinesh 3.2.0-29-generic-pae #46-Ubuntu SMP Fri Jul 27 17:25:43 UTC 2012 i686 i686 i386 GNU/Linux

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#5

Ok, which partition do you want to mount?

Revision history for this message
Rinesh Mehta (rineshmehta) said :
#6

both
dev/sda2 and dev/sda4

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#7

ok and the output of:

mount

Thanks

Revision history for this message
Rinesh Mehta (rineshmehta) said :
#8

following is the output of :

mount

/dev/sda1 on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
gvfs-fuse-daemon on /home/rinesh/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=rinesh)

thank you

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#9

Try:

sudo mkdir /media/sda2
sudo mount /dev/sda2 /media/sda2
sudo mkdir /media/sda4
sudo mount /dev/sda4 /media/sda4

Should now be accessible from the 2 folders in /media

Revision history for this message
Rinesh Mehta (rineshmehta) said :
#10

still it shows the same message when i try to open the partition:

"the folder content could not be displayed"
"You do not have the permissions necessary to view the contents of "documents"."

you can view the screen capture here :
http://ubuntuone.com/4ZkHohSyGdLbNsSeBCzPwA

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#11

Is the filesystem for pure data storage or is it another distribution?

Revision history for this message
Rinesh Mehta (rineshmehta) said :
#12

i dint get your question but still here is a screenshot which may help you
http://ubuntuone.com/5p78cCqVgQPVKvfVVgHKUb

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#13

Do the Ext4 partitions contain only your user data?

Revision history for this message
Rinesh Mehta (rineshmehta) said :
#14

yes

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#15

Then run:

sudo chown -R $USER:$USER /media/sda2
sudo chown -R $USER:$USER /media/sda4

And you will get access.

Revision history for this message
Rinesh Mehta (rineshmehta) said :
#16

not yet
:-(

Revision history for this message
N1ck 7h0m4d4k15 (nicktux) said :
#17

If you want to access these folders with nautillus , then you must open nautilus as super-user.

BE CAREFUL with this option cuz you will have access to sensitive data of your Operating System and you can destroy it.

From terminal give

1) gksudo nautilus

Thanks

Revision history for this message
Rinesh Mehta (rineshmehta) said :
#18

sorry, but this is not a proper solution i can access those partitions for temperory

can you give me solution for accessing those parttions as a normal user to access them on regular basis

Revision history for this message
Best N1ck 7h0m4d4k15 (nicktux) said :
#19

ΟΚ.

Then you must configure /etc/fstab file and mount the partitions permanent with appropriate permissions.

For linux filesystems check here for correct permissions and permanent mounting : https://wiki.archlinux.org/index.php/Fstab

The other way is to change the owner and the permissions with chown and chmod .

First create the mount points

mkdir disk1

mkdir disk2

Then mount the partitions

sudo mount /dev/sda2 disk1/
sudo mount /dev/sda4 disk2/

Then try to change the owner
sudo chown -R username:username disk1/
sudo chown -R username:username disk2/

Where username replace it with yours.

Then change the permissions
sudo chmod -R u+rwxr disk1/
sudo chmod -R u+rwxr disk2/

Let me know which way worked .

Thanks

Revision history for this message
Rinesh Mehta (rineshmehta) said :
#20

i am not twechnician therefore i could not understand first way and second way dint work properly

Revision history for this message
N1ck 7h0m4d4k15 (nicktux) said :
#21

Can you mount the partitions and provide the results of bellow commands ?

ls -l disk1/

ls -l disk2/

Also give the results of these commands

sudo blkid

cat /etc/fstab

Thanks

Revision history for this message
Rinesh Mehta (rineshmehta) said :
#22

Thanks NikTh, that solved my question.