nautilus showing error "The folder contents could not be displayed."

Asked by deep heart

I'm unable to access any files/folders in any of the partition sda1,sda2,sda3,sda4 .....
shows an error

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

however It is still possible to access files in some folders like "documents , music , videos , downloads "
but problem is when I try to access any of sda drive .
even when I try to browse using any other app like chrome or music player I can't locate any file :(

please fix it as soon as possible .

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu nautilus Edit question
Assignee:
No assignee Edit question
Solved by:
Wyatt Smith
Solved:
Last query:
Last reply:
Revision history for this message
Jeet (gour-jitendrasingh) said :
#1

this is because you did not mounted SDA .. please mount using

sudo mount /dev/sda (sda1 or sda2 whatever you want to mount )

thanks

Revision history for this message
deep heart (d-deep-heart) said :
#2

no all partitions are already mounted but this doesn't solve my problem..
same persist :(

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

Can you give the output of:

mount; lsb_release -a; uname -a

Thanks

Revision history for this message
deep heart (d-deep-heart) said :
#4

xdeeep@super:~$ mount; lsb_release -a; uname -a
/dev/sda7 on / type ext4 (rw,errors=remount-ro,commit=600)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
fusectl 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)
/dev/sda1 on /media/sda1 type ntfs (ro)
/dev/sda2 on /media/sda2 type ntfs (ro)
/dev/sda5 on /media/sda5 type ntfs (ro)
/dev/sda6 on /media/sda6 type ntfs (ro)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
gvfs-fuse-daemon on /home/xdeeep/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=xdeeep)
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 11.10
Release: 11.10
Codename: oneiric
Linux super 3.0.0-17-generic #30-Ubuntu SMP Thu Mar 8 17:34:21 UTC 2012 i686 i686 i386 GNU/Linux

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

Seems /dev/sda is full of NTFS partitions, you can access them via:

nautilus /media

You should then be able to enter the folders, they are read only. Is this what you are already doing?

Revision history for this message
deep heart (d-deep-heart) said :
#6

yes they're read only .. but I can't access them .
shows error as I told in question .

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

Revision history for this message
deep heart (d-deep-heart) said :
#7

sorry I just found that all partition are "unreadable"
please ignore my above comment .

Revision history for this message
Wyatt Smith (wyatt-smith) said :
#8

Appears to be ownership/permission problem.

I suspect that all the folders are owned by root. To check the ownership.
ls -l /media

Please tell the output of...
sudo blkid ; cat /etc/fstab

Once we have this output we can help you set the proper ownerships/permissions. I suspect that you would like to take ownership and have read/write privileges . Please correct me if I am wrong.

Revision history for this message
deep heart (d-deep-heart) said :
#9

well I just checked running ubuntu 11.10 live and everything works fine .. So ntfs system may not be causing any problem.

and here is the output of the
"sudo blkid ; cat /etc/fstab"

xdeeep@super:~$ sudo blkid ; cat /etc/fstab
[sudo] password for xdeeep:
/dev/sda1: UUID="98BA71DDBA71B7F8" TYPE="ntfs"
/dev/sda2: LABEL="music n entertain" UUID="8A50ECAB50EC9F67" TYPE="ntfs"
/dev/sda5: LABEL="professional data" UUID="A858BD8F58BD5D2E" TYPE="ntfs"
/dev/sda6: LABEL="freee" UUID="01CCF7EA922C5A90" TYPE="ntfs"
/dev/sda7: UUID="0928d6d3-e57e-4347-8693-2761707453cf" TYPE="ext4"
/dev/sda8: UUID="db1f4d13-c405-470f-bbed-e323e2445853" TYPE="swap"
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
# / was on /dev/sda7 during installation
UUID=0928d6d3-e57e-4347-8693-2761707453cf / ext4 errors=remount-ro 0 1
# swap was on /dev/sda8 during installation
UUID=db1f4d13-c405-470f-bbed-e323e2445853 none swap sw 0 0
/dev/sda1 /media/sda1 ntfs defaults 0 0
/dev/sda2 /media/sda2 ntfs defaults 0 0
/dev/sda5 /media/sda5 ntfs defaults 0 0
/dev/sda6 /media/sda6 ntfs defaults 0 0

Revision history for this message
deep heart (d-deep-heart) said :
#10

yes all folders are owned by root

output of "ls -l /media"

xdeeep@super:~$ ls -l /media
total 76
dr-x------ 1 root root 24576 2012-05-12 10:21 sda1
dr-x------ 1 root root 20480 2012-05-11 23:00 sda2
dr-x------ 1 root root 12288 2012-05-12 10:29 sda5
dr-x------ 1 root root 20480 2012-05-11 23:00 sda6
xdeeep@super:~$

Revision history for this message
Best Wyatt Smith (wyatt-smith) said :
#11

The problem is with you /etc/fstab file. Here is a link to Community Document regarding /etc/fstab.
https://help.ubuntu.com/community/Fstab

Here are my recommendations for modifying /etc/fstab.
1) Specific partition by UUID rather the /dev/sdaX as this is much more reliable.
2) Use a mountpoint name that is more descriptive and meaningful rather than /sdaX
3) Mount filesystem as ntfs-3g rather than ntfs as the latter does not contain write support.
4) Explicitly set ownership/permissions in the mount options.

I will show an example for setting the partition (sda2) "music n entertain", I will leave it up to you for the others.

First unmount all partitions with
sudo umount -a

Remove old mountpoint if it still exists.
sudo rm -rf /media/sda2

Create a new mountpoint
sudo mkdir /media/MULTIMEDIA

Edit fstab as superuser
gksu gedit /etc/fstab

Change modify the /dev/sda2 line to be
 UUID=8A50ECAB50EC9F67 /media/MULTIMEDIA ntfs-3g umask=000,defaults,utf8 0 0

Save and exit. Then remount all partitions with
sudo mount -a

As you can see in my example I have used the UUID from the blkid command rather than /dev/sda2. I called the mountpoint /media/MULTIMEDIA but feel free to change this to something more meaningful or keep as /media/sda2. In regards to naming, please do not include spaces in the name. It is important that the name of the mountpoint is consistent with fstab.

If this has provided the desired results, you can proceed with setting up the other partitions similarly. If not you can modify the options in fstab to explicitly set ownership with uid and gid options. For a complete list of mount options you ntfs partitions please read the output of
man ntfs-3g

I think it best and more meaningful if you can work through this yourself. If you run into additional problems. You can repost the output of the following command for more help.
ls -l /media ; sudo blkid ; cat /etc/fstab ; id

Good Luck

Revision history for this message
Wyatt Smith (wyatt-smith) said :
#12

CAUTION !!!!!
I just realized something which potentially could be dangerous.

DO NOT REMOVE THE MOUNTPOINT with
sudo rm -rf /media/sda2

IF THE PARTITION IS STILL MOUNTED FOR SOME REASON, THIS COMMAND CAN WIPE OUT ALL YOUR DATA.

Only remove the old mountpoint at the end of the process if everything is working properly under a new mountpoint. Then in that case, first check that there are no files in that that directory. If there are no files, then and ONLY then remove the directory with
sudo rmdir /media/sda2

Revision history for this message
deep heart (d-deep-heart) said :
#13

thanks smith...
I'll follow your instructions .
and will get in touch soon

thanks for your time :)

Revision history for this message
deep heart (d-deep-heart) said :
#14

I just can't unmount partitions .. :(

xdeeep@super:~$ sudo umount -a
umount: /run/shm: device is busy.
        (In some cases useful info about processes that use
         the device is found by lsof(8) or fuser(1))
umount: /run: device is busy.
        (In some cases useful info about processes that use
         the device is found by lsof(8) or fuser(1))
umount: /dev: device is busy.
        (In some cases useful info about processes that use
         the device is found by lsof(8) or fuser(1))
umount: /: device is busy.
        (In some cases useful info about processes that use
         the device is found by lsof(8) or fuser(1))
xdeeep@super:~$

Revision history for this message
Chris (fabricator4) said :
#15

Also check that ntfs-3g is installed. Past NTFS problems have occured because it doesn't get installed for some reason:

sudo apt-get install ntfs-3g

Never, ever, use 'rm -rf' to remove a mountpoint. It will certainly delete the mountpoint, but also anything else it finds mounted there. Most likely these mountpoints will disappear when the device is unmounted, unless you specifically made them.

Unmounting can be achieved with:

sudo umount /dev/sdxy

Where x is the drive and y is the partition on that drive.

I think umount -a tries to unmount absolutely everything, which is why it (fortunately) failed on some things.

Chris

Revision history for this message
Wyatt Smith (wyatt-smith) said :
#16

That output is normal as those are system directories which are unmountable. All you mounts on /dev/sda should now be unmounted.

Revision history for this message
Jeet (gour-jitendrasingh) said :
#17

Umount -a will try to unmount all partition on disk which include ur system
root boot proc. Etc etc.. that's y its failing .. if you want to unmount
specific partition you have to mention it

Thanks
On May 13, 2012 9:15 AM, "Chris" <email address hidden>
wrote:

> Question #196957 on evolution in Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+source/evolution/+question/196957
>
> Status: Open => Answered
>
> Chris proposed the following answer:
> Also check that ntfs-3g is installed. Past NTFS problems have occured
> because it doesn't get installed for some reason:
>
> sudo apt-get install ntfs-3g
>
> Never, ever, use 'rm -rf' to remove a mountpoint. It will certainly
> delete the mountpoint, but also anything else it finds mounted there.
> Most likely these mountpoints will disappear when the device is
> unmounted, unless you specifically made them.
>
> Unmounting can be achieved with:
>
> sudo umount /dev/sdxy
>
> Where x is the drive and y is the partition on that drive.
>
> I think umount -a tries to unmount absolutely everything, which is why
> it (fortunately) failed on some things.
>
> Chris
>
> --
> You received this question notification because you are a direct
> subscriber of the question.
>

Revision history for this message
deep heart (d-deep-heart) said :
#18

thanks all for your precious time and support ..
I just installed ntfs3g using command
sudo apt-get install ntfs-3g

and then unmounted one partition sda2 using command
sudo umount /dev/sdxy

created a new mountpoint
sudo mkdir /media/MULTIMEDIA

and run this command
gksu gedit /etc/fstab

at this point I didn't have any Idea what to do so I just closed the txt file which opened automatically

and then just remounted all partitions using command
sudo mount -a

and all partitions got mounted now... and all files and folders are accessible.

thanks a lot friends .

http://fb.me/d.satan

Revision history for this message
deep heart (d-deep-heart) said :
#19

Thanks Wyatt Smith, that solved my question.