PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : NFS mit Fedora Core 3



.::malamut::.
17.12.04, 19:06
Ich habe meine Systeme von FC2 (Clients) und Suse 9 (Server) auf FC3 (Alle) umgestellt und nun lassen sich die NFS-Freigaben auf den Clients nicht mehr mounten.

Hier die exports des Servers:


/backup 192.168.1.0 (rw,sync)
/home 192.168.1.0 (rw,sync)
/multimedia 192.168.1.0 (rw,sync)
/settings 192.168.1.0 (rw,sync)
/share 192.168.1.0 (rw,sync)
/software 192.168.1.0 (rw,sync)
hier der betreffende Ausschnitt der fstab der Clients:


192.168.1.2:/backup/multimedia /multimedia nfs4 default 0 0
Leider bringt das mounten des o.g. Ordners folgende Fehlermeldung:


mount to NFS server '192.168.1.2' failed.
Kann mir jemand weiterhelfen, wie ich die Freigaben mit FC3 und SELinux mounte? Orde gibt es gute Anleitungen im Netz - ich habe nichts passendes gefunden...

Tomek
17.12.04, 19:46
Google und die Fedora FAQ spucken das hier aus:

Q: How do I share directories using NFS between Fedora Core and non-SELinux systems?

A: Just as NFS transparently supports many file system types, it can be used to share directories between SELinux and non-SELinux systems.

When mounting a non-SELinux file system via NFS, by default SELinux will treat all the files in the share as having a context of nfs_t. You can override the default context by setting it manually using the context= option. For example, this would make the files in the NFS mounted directory appear to have a context of system_u:object_r:tmp_t to SELinux:

mount -t nfs -o context=system_u:object_r:tmp_t server:/shared/foo /mnt/foo

When SELinux exports a file system via NFS, files created will have the context of the directory they were created in. In other words, the presence of SELinux on the remote mounting system has no effect on the local security contexts.
http://fedora.redhat.com/docs/selinux-faq-fc3/index.html#id3523296

Euras
17.12.04, 19:59
Du musst überprüfen das zwischen den Netz und den Rechten kein Lehrzeichen besteht. Und du solltest die Netzwerkmaske mit angeben.......

/multimedia 192.168.1.0/24(rw,sync)

Jetzt habe alle Clients die im Netzwerk 192.168.1.0 befinden read/write Zugriff auf die Freigabe. Du solltest zusätzlich noch deine host.allow und host.deny unter /etc überprüfen. Über diese zwei Dateien kann man den Zugriff auf die NFS Shares begrenzen.

Anleitung auf Englisch:
http://www.snow.nl/dist/xhtmlc/ch09s02.html

viel Spass