Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Fixed: Zugriffsrechte in Kombination mit encfs und nfs
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
Erdie
Advocate
Advocate


Joined: 20 May 2004
Posts: 2576
Location: Heidelberg - Germany

PostPosted: Sat Jun 21, 2014 1:30 pm    Post subject: Fixed: Zugriffsrechte in Kombination mit encfs und nfs Reply with quote

Um es kurz zu fassen, ich habe auf dem Raspberry Pi ein Filesystem folgendermaßen exportiert:

Code:
 /mnt/usbplatte  *(rw,no_subtree_check,async,no_root_squash,nohide)


Auf dem filesystem befinden sich u. a. 2 Verzeichnisse: ".data" und "Data". Der Inhalt des ersten wird auf das zweite mit encfs gemountet:

(Ausschnitt aus "mount" Ausgabe))
Code:
encfs on /mnt/usbplatte/Data type fuse.encfs (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions)


Damit "Data" auf dem exportierten filesystem überhaupt sichtbar wird, muß noch zusätzlich folgendes exportiert werden:

Code:
/mnt/usbplatte/Data *(fsid=2,rw,no_subtree_check,async,no_root_squash,nohide)


Die Zugriffsrechte auf dem Pi sehen lokal folgendermaßen aus:

Code:
root@raspberrypi:/mnt/usbplatte# ls -la
total 92
drwxr-xr-x   7 root root   4096 Jun 21 12:12 .
drwxr-xr-x   4 root root   4096 Jun 22  2013 ..
drwxrwx---   5 pi   users  4096 Jun 21 12:01 Backup
drwxrwxrwx   3 pi   users  4096 Jun 21 13:10 .data
drwxrwxrwx   3 pi   users  4096 Jun 21 13:10 Data
drwxr-xr-x 383 pi   pi    65536 Jun 17 17:15 Filme
drwxrwx---  27 pi   users  4096 Jun 11 20:53 MP3
root@raspberrypi:/mnt/usbplatte#


(Wenn das funktioniert, werde ich das noch einschränken).

Lokal auf dem Pi kann ich Daten in das Verzeichnis "Data" ablegen:

Code:
root@raspberrypi:/mnt/usbplatte/Data# touch test1.txt
root@raspberrypi:/mnt/usbplatte/Data# ls -la
total 8
drwxrwxrwx 2 pi   users 4096 Jun 21 13:24 .
drwxr-xr-x 7 root root  4096 Jun 21 12:12 ..
-rw-r--r-- 1 root root     0 Jun 21 13:24 test1.txt
root@raspberrypi:/mnt/usbplatte/Data#


Versuche ich das auf dem Remote host, auf dem das nfs gemountet wurde, funktioniert das nicht:

Code:
martin@kellerkind /mnt/nfs1/Data $ touch test2.txt
touch: cannot touch 'test2.txt': Permission denied
martin@kellerkind /mnt/nfs1/Data $


Es wird aber trotz Fehlermeldung eine leere Datei angelegt. Wenn ich eine nicht leere Datei dort hinkopieren möchte, entsteht auch nur eine leere Datei im Zielordner.

Ich habe schon versucht, "Data" als user "Pi" statt als root mit encfs zu mounten. Wenn ich das jedoch mache, wird der Ordner "Data" auf dem Remote host unsichtbar.

Wie kann ich es erreicht, dass ich in "Data" über nfs Dateien ablegen kann?
_________________
Desktop AMD Ryzen 9 5900X 32GB RAM, Asus GF GTX 1060.
Notebook Tuxedo Pulse 15 Gen1 AMD Ryzen 7 4800H mit Radeon Vega 7
Raspberry Pi 1 + 2 + 3B+ + Zero W


Last edited by Erdie on Sat Jun 21, 2014 8:12 pm; edited 1 time in total
Back to top
View user's profile Send private message
mv
Watchman
Watchman


Joined: 20 Apr 2005
Posts: 6747

PostPosted: Sat Jun 21, 2014 3:14 pm    Post subject: Reply with quote

Hast Du encfs die Option --public übergeben?
Back to top
View user's profile Send private message
Erdie
Advocate
Advocate


Joined: 20 May 2004
Posts: 2576
Location: Heidelberg - Germany

PostPosted: Sat Jun 21, 2014 7:16 pm    Post subject: Reply with quote

mv wrote:
Hast Du encfs die Option --public übergeben?


Nein, das könnte es sein, ich werde es testen. Danke.

EDIT: Ja, das ist die Lösung. Man sollte sich die Hilfe einfach genauer durchlesen ;)
_________________
Desktop AMD Ryzen 9 5900X 32GB RAM, Asus GF GTX 1060.
Notebook Tuxedo Pulse 15 Gen1 AMD Ryzen 7 4800H mit Radeon Vega 7
Raspberry Pi 1 + 2 + 3B+ + Zero W
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