# Can't browse /media subdirs through NFS

## urcindalo

Hi!

I own a Xtreamer multimedia HD connected to my TV, and I can browse my laptop NFS configured directories from it. However, I can't browse the folders in /media if I set up /media as the directory to share.

Let me elaborate to better explain the issue. This is my current /etc/exports file:

```
$ cat /etc/exports

# /etc/exports: NFS file systems being exported.  See exports(5).

/media/Almacen250GB/ 192.168.1.0/255.255.255.0(insecure)

/media 192.168.1.0/255.255.255.0(insecure)
```

With this set up I can perfectly browse the contents of /media/Almacen250GB/ on my TV through the multimedia HD. However, to my suprise, when I want to browse the same folder from the /media share point, I can see its subfolder Almacen250GB appearing, but with an empty content.

In other words, when clicking on the /media/Almacen250GB/ share point, I can browse through its subfolders and select whichever file I please. But, when clicking on the /media share point, after entering into its Almacen250GB subfolder, the latter is empty.

Why is that? Am I missing something? What must I do to browse any subfolder in /media?

I need that to display the content of any USB device I connect to the computer on the TV, without setting up an explicit share point for every one of them.

Thanks in advance.

----------

## NeddySeagoon

urcindalo,

Are we really talking directories or are the directories in question used as mount points for other block devices?

NFS does not by default make the contents of mount points available when you share and mount the parent filesystem

The NFS client needs to mount this for itself.

Read up on the nohide option in the man page

----------

## _______0

nfs can't share dynamically mounted devices. However before further speculating about it first provide detailed info about ur setup:

mount info

nfs version info

etc...

more logs

looks like ur using obsolete nfs3 there.

----------

## Thistled

 *

----------

## urcindalo

First of all, thanks everybody for your help.

Indeed, my directories are mount points for other block devices. That's why they are in /media   :Smile: 

Thanks for pointing me out to the nohide option, although in my case it was crossmnt that was needed. From the exports man page:

```
crossmnt 

 This option is similar to nohide  but it makes it possible for clients to move from the filesystem marked with crossmnt to exported filesystems mounted on it. Thus when a child filesystem "B" is mounted on a parent "A", setting crossmnt on "A" has the same effect as setting "nohide" on B.
```

So, after changing my /etc/exports to this:

```
$ cat /etc/exports

# /etc/exports: NFS file systems being exported.  See exports(5).

/media/ 192.168.1.60(crossmnt,subtree_check)
```

it now works with my internal ReiserFS and an external ext4 partitions.

However, to my surprise, I can't see the content of two FAT32 4GB pendrives.

Any clue on this? The client is an Xtreamer device running a Linux 2.6.12.6-VENUS kernel. So, apart from actually running Linux, the client device is able to read both FAT32 pens when they are plugged into its USB port. And, of course, my laptop also deals with them perfectly well.

Thanks in advance.

----------

## urcindalo

I think I got the answer to my last question, but can't solve the matter   :Confused: 

When taking a look at /media, I found out my Linux formatted partitions have drwxrwxrwx permissions and belong to root:root

On the other hand, my FAT32 mounted partitions have drwx------ permissions and belong to me.

Take a look at this series of commands:

```
/media $ ls -la

total 5

-rw-r--r--  1 root   root      0 may 11  2011 .hal-mtab

-rw-r--r--  1 root   root      0 jun 13 16:15 .keep_sys-fs_udisks-0

drwx------  4 myname myname 4096 ene  1  1970 9AFA-DB42

drwxrwxrwx 23 root   root    816 oct 15 16:57 Almacen250GB

/media $ chmod a+rwx 9AFA-DB42

/media $ ls -la

total 5

-rw-r--r--  1 root   root      0 may 11  2011 .hal-mtab

-rw-r--r--  1 root   root      0 jun 13 16:15 .keep_sys-fs_udisks-0

drwx------  4 myname myname 4096 ene  1  1970 9AFA-DB42  ----> FAT32 mounted pendrive

drwxrwxrwx 23 root   root    816 oct 15 16:57 Almacen250GB  ----> Internal ReiserFS partition
```

Why can't I change the permissions on the mounted FAT32 pendrive?

----------

## Veldrin

fat32 does not understand unix permission. 

but you can assign a certain permission set (and owner) at mount time using umask, dmask, fmask, gid, and uid respectively (use man mount for details).

for mounting (more or less) permanent storage, i suggest that you use /mnt and not /media. 

V.

----------

## urcindalo

 *Veldrin wrote:*   

> fat32 does not understand unix permission.

 

Oops! You're absolutely right. Sometimes I forget it's a crap filesystem   :Rolling Eyes: 

 *Veldrin wrote:*   

> but you can assign a certain permission set (and owner) at mount time using umask, dmask, fmask, gid, and uid respectively (use man mount for details).

 

I know, but the goal is to plug & play  :Smile: 

 *Veldrin wrote:*   

> for mounting (more or less) permanent storage, i suggest that you use /mnt and not /media. 

 

I prefer not to bloat fstab and to let udisks decide. Again, the lesser I intervene, the more convenient  :Smile: 

----------

