Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
mount --bind ... in Sambafreigabe
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
SarahS93
l33t
l33t


Joined: 21 Nov 2013
Posts: 693

PostPosted: Thu Jun 26, 2014 7:47 am    Post subject: mount --bind ... in Sambafreigabe Reply with quote

/mnt/festplatte1/dateifreigabe/ habe ich per Samba freigegeben.
Dann habe mkdir /mnt/festplatte1/dateifreigabe/bilder gemacht.
Und danach ein mount --bind --read-only /mnt/festplatte2/bilder/ /mnt/festplatte1/dateifreigabe/bilder/
Rufe ich "mount" auf, erscheint in der entsprechenden Zeile am ende ein (rw,bind).
Bei dem mount befehl kam keine Fehlermeldung, warum hat er es als rw und nicht als ro eingebunden?
Ist sowas eigentlich klug? Kann der Sambabenutzer irgendwie aus /mnt/festplatte1/dateifreigabe/bilder/ raus, eine Ebene höher gelangen und ist dann plötzlich auf /mnt/festplatte2/ ?
Back to top
View user's profile Send private message
SarahS93
l33t
l33t


Joined: 21 Nov 2013
Posts: 693

PostPosted: Sun Jun 29, 2014 5:12 pm    Post subject: Reply with quote

Huhu?
Back to top
View user's profile Send private message
py-ro
Veteran
Veteran


Joined: 24 Sep 2002
Posts: 1734
Location: Velbert

PostPosted: Sun Jun 29, 2014 5:45 pm    Post subject: Reply with quote

http://lwn.net/Articles/281157/

Erster Treffer bei Google, hat 3s gedauert, in den Tagen wo Du hier den Post immer wieder hoch geschoben hast hättest das finden können. ;)

Nein, an kann über den Bind Mount nicht nach oberhalb von Ihm ausbrechen.

Bye
Py
Back to top
View user's profile Send private message
SarahS93
l33t
l33t


Joined: 21 Nov 2013
Posts: 693

PostPosted: Sun Jun 29, 2014 6:37 pm    Post subject: Reply with quote

Naja, den Link hatte ich glaub ich auch zwischen den ganzen dutzenden die ich über google finden konnte.
Aber mein Problem, warum wenn ich mount aufrufe dort dann (rw,bind) steht obwohl ich "mount --bind -o ro" gemacht habe, konnte ich so noch nicht klären. Oder ich verstehe dabei etwas falsch :/.
Back to top
View user's profile Send private message
py-ro
Veteran
Veteran


Joined: 24 Sep 2002
Posts: 1734
Location: Velbert

PostPosted: Sun Jun 29, 2014 7:17 pm    Post subject: Reply with quote

Selbst mit Google Translate sollte der Link verständlich sein:

Quote:
So a command like:

mount --bind -o ro /vital_data /untrusted_container/vital_data
will fail to make /vital_data read-only under /untrusted_container if it was mounted writable initially.


Sprich, ist die Quelle als RW gemountet, ist es der bind mount auch.

Quote:
the read-only attribute can only be added with a remount operation afterward. So the necessary sequence is something like:

mount --bind /vital_data /untrusted_container/vital_data
mount -o remount,ro /untrusted_container/vital_data


Ein remount mit RO sollte demnach funktionieren.

Bye
Py
Back to top
View user's profile Send private message
SarahS93
l33t
l33t


Joined: 21 Nov 2013
Posts: 693

PostPosted: Sun Jun 29, 2014 7:35 pm    Post subject: Reply with quote

Das habe ich auch so gemacht, das rw bleibt bestehen wenn ich mount aufrufe.
Back to top
View user's profile Send private message
py-ro
Veteran
Veteran


Joined: 24 Sep 2002
Posts: 1734
Location: Velbert

PostPosted: Sun Jun 29, 2014 9:13 pm    Post subject: Reply with quote

Du hast nach dem Mount noch ein remount gemacht?
Back to top
View user's profile Send private message
SarahS93
l33t
l33t


Joined: 21 Nov 2013
Posts: 693

PostPosted: Sun Jun 29, 2014 9:25 pm    Post subject: Reply with quote

Ja, habe ich. Das wundert mich ja.
Nach einem "mount -o remount,ro /mnt/festplatte1/dateifreigabe/bilder/"
Steht es wenn ich "mount" aufrufe, immer noch mit rw dort.
Soviel verkehrt machen kann ich dabei doch garnicht :/
Back to top
View user's profile Send private message
py-ro
Veteran
Veteran


Joined: 24 Sep 2002
Posts: 1734
Location: Velbert

PostPosted: Sun Jun 29, 2014 10:28 pm    Post subject: Reply with quote

Hmm:

Code:
mount -o bind,ro /data/test bind
gatekeeper mnt # mount
/dev/sda3 on /mnt/bind type btrfs (rw,noatime,space_cache)
gatekeeper mnt # mount -o remount,ro bind
/dev/sda3 on /mnt/bind type btrfs (ro,noatime,space_cache)


Klappt hier wie beschrieben.

Bye
Py
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum