PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Read Only Mount funktioniert nicht



schranzip
03.04.07, 22:13
Hi allerseits,

hab ein kleines Problem, vielleicht kann mir da jmd helfen...
Ich möchte ein Verzeichnis an eine andere Stelle im Dateisystem spiegeln. Dies ist möglich mit der --bind option von mount. Allerdings soll das gespiegelte Verzeichnis read-only sein.

Also habe ich folgenden Aufruf:
mount --bind -o ro -t ext3 /verzA /verzB

Das mouten klappt, mount gibt mir danach auch brav aus:
/verzA on /verzB type ext3 (ro,bind)

Allerdings kann ich immernoch in /verzB schreiben, umbenennen,etc, also alles was ich eigentlich nicht erlauben will.

Irgendwelche Tips, Hinweise, etc??? DANKE!!
Gruss,
Sven

PS: Ich muss das mounten leider händisch / per script machen, per fstab machts für mich keinen sinn...

kreol
03.04.07, 22:25
Note that the filesystem mount options will remain the same as those on the original mount point, and cannot be
changed by passing the -o option along with --bind/--rbind....

Was hast Du denn genau vor? Vllt. ist chroot Dein Freund.


Kreol

schranzip
03.04.07, 22:26
uuups...
das hab ich garnicht gesehen...

danke und sry :)

kreol
03.04.07, 22:36
Wie gesagt: Was hast Du vor? Vllt gibt es andere Wege.

Habe z.B. keine Erfahrung mit "--move", aber ein Versuch wäre es wert:
Since Linux 2.5.1 it is possible to atomically move a mounted tree to another place. The call is
mount --move olddir newdirOder das bereits erwähnte chroot...


Kreol