I want to access the files in my portable hard disk, so I bind-mount the /media
directory to the schroot jail by adding a line
/media /media none rw,bind 0 0
to its corresponding config file /etc/schroot/.../fstab
.
In the jail, I could see the mounted directory by run ls -l /media/[my.username]
total 4
drwx------ 2 root root 4096 Dec 9 01:32 Seagate Expansion Drive
But the problem is that I could not read or write the directory.
While if I run the same command ls -l /media/[my.username]
outside the jail, the directory permission is set correctly.
total 4
drwx------ 1 [my.username] [my.username] 4096 Nov 15 15:50 Seagate Expansion Drive