0

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

1 Answer 1

0

I found the solution. I should have rbind-mount the directory,

/media          /media          none    rw,rbind         0       0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .