Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[NFS] pas d'accès en écriture (Résolu)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index French
View previous topic :: View next topic  
Author Message
SlashRhumSlashNeisson
Apprentice
Apprentice


Joined: 30 Dec 2006
Posts: 201
Location: Lille

PostPosted: Tue Jun 30, 2009 6:05 am    Post subject: [NFS] pas d'accès en écriture (Résolu) Reply with quote

Salut à tous,

Afin de disposer d'accès via mes postes client sur mon server (sans server X), j'installe nfs-utils.

conf sur le server:

Code:

 ~ $ eix -I nfs
[I] net-fs/nfs-utils
     Available versions:  1.1.4-r1 ~1.1.5 ~1.1.6 ~1.1.6-r1 ~1.2.0 {ipv6 kerberos nfsv3 nfsv4 nonfsv4 tcpd}
     Installed versions:  1.1.4-r1(07:31:52 28/06/2009)(tcpd -kerberos -nonfsv4)
     Homepage:            http://linux-nfs.org/
     Description:         NFS client and server daemons

[I] net-libs/libnfsidmap
     Available versions:  0.19 0.21-r1 {ldap}
     Installed versions:  0.21-r1(07:30:58 28/06/2009)(-ldap)
     Homepage:            http://www.citi.umich.edu/projects/nfsv4/linux/
     Description:         NFSv4 ID <-> name mapping library

Found 2 matches.


Code:

$ grep NFS /usr/src/linux/.config
CONFIG_NFS_FS=y
CONFIG_NFS_V3=y
# CONFIG_NFS_V3_ACL is not set
# CONFIG_NFS_V4 is not set
CONFIG_ROOT_NFS=y
CONFIG_NFSD=y
CONFIG_NFSD_V3=y
# CONFIG_NFSD_V3_ACL is not set
# CONFIG_NFSD_V4 is not set
CONFIG_NFS_COMMON=y


Je créé un repertoire testnfs dans ma home sur le server

Code:
drwxr-xr-x  2 eddie eddie  104 juin 28 12:06 testnfs


Dans /etc/exports

Code:

# /etc/exports: NFS file systems being exported.  See exports(5).
/home/eddie/testnfs IP_client(sync,no_subtree_check,rw)


Pour un accès en écriture sur testnfs :wink:

Je démarre les services

Code:

 # /etc/init.d/nfs restart
 * Stopping NFS mountd ...                                                         [ ok ]
 * Stopping NFS daemon ...                                                         [ ok ]
 * Exporting NFS directories ...                                                   [ ok ]
 * Starting NFS mountd ...                                                         [ ok ]
 * Starting NFS daemon ...                                                         [ ok ]
 * Starting NFS smnotify ...                                                       [ ok ]


Vérification du mount

Code:

# showmount -e
Export list for IP_server:
/home/eddie/testnfs         IP_client


conf sur le client:

Code:

$ eix -I nfs
[I] net-fs/nfs-utils
     Available versions:  1.1.4-r1 ~1.1.5 ~1.1.6 ~1.1.6-r1 ~1.2.0 {ipv6 kerberos nfsv3 nfsv4 nonfsv4 tcpd}
     Installed versions:  1.1.4-r1(11:56:36 28/06/2009)(tcpd -kerberos -nonfsv4)
     Homepage:            http://linux-nfs.org/
     Description:         NFS client and server daemons

[I] net-libs/libnfsidmap
     Available versions:  0.19 0.21-r1 {ldap}
     Installed versions:  0.21-r1(11:54:19 28/06/2009)(ldap)
     Homepage:            http://www.citi.umich.edu/projects/nfsv4/linux/
     Description:         NFSv4 ID <-> name mapping library

Found 2 matches.


Code:

$ grep NFS /usr/src/linux/.config
CONFIG_NFS_FS=y
CONFIG_NFS_V3=y
# CONFIG_NFS_V3_ACL is not set
# CONFIG_NFS_V4 is not set
# CONFIG_NFS_DIRECTIO is not set
CONFIG_NFSD=y
CONFIG_NFSD_V3=y
# CONFIG_NFSD_V3_ACL is not set
# CONFIG_NFSD_V4 is not set
# CONFIG_NFSD_TCP is not set
CONFIG_NFS_COMMON=y


Je créé un répertoire nfs dans /mnt

Je démarre les services

Code:

bin       5087     1  0 06:18 ?        00:00:00 /sbin/portmap
nobody    5147     1  0 06:18 ?        00:00:00 /sbin/rpc.statd --no-notify


Montage du répertoire sur le client

Code:
# mount -t nfs IP_server:/home/eddie/testnfs /mnt/nfs


Vérification:

Code:
$ mount
IP_server:/home/eddie/testnfs on /mnt/nfs type nfs (rw,addr=IP_server)


Donc à priori je dispose d'un accès en écriture dans le répertoire testnfs :roll:

Code:

$ cd /mnt
$ ls
drwxr-xr-x 2  1003  1005  104 juin 28 12:06 nfs


Code:

$ cd nfs
$ mkdir toto
mkdir: ne peut créer le répertoire `toto': Permission non accordée


Même chose lorsque j'édite avec vi un fichier (fichier en lecture seulement). :roll:

J'ai fais plusieurs tests avec diverses options dans /etc/exports, sans succès sur le client. :cry:

J'ai sans doute omis quelque chose de flagrant, mais je sèche :?:
_________________
Gentoo only


Last edited by SlashRhumSlashNeisson on Tue Jun 30, 2009 4:15 pm; edited 1 time in total
Back to top
View user's profile Send private message
kwenspc
Advocate
Advocate


Joined: 21 Sep 2003
Posts: 4954

PostPosted: Tue Jun 30, 2009 6:35 am    Post subject: Reply with quote

UID/GID identique sur les reps NFS (donc sur le serv) et ta machine locale? tout vient de là amha. En gros le proprio sur le serv et ton user sur ta machine locale doivent avoir les mêmes UID/GID. En gros même user (même entrée dans /etc/passwd) sur les deux machines.
Back to top
View user's profile Send private message
SlashRhumSlashNeisson
Apprentice
Apprentice


Joined: 30 Dec 2006
Posts: 201
Location: Lille

PostPosted: Tue Jun 30, 2009 4:15 pm    Post subject: Reply with quote

Yes,

c'était bien ça, :lol:

sur le client:

Code:

$ mount
IP_server:/home/eddie/testnfs on /mnt/nfs type nfs (rw,user=eddie,hard,intr,addr=IP_server)


merci kwenspc :wink:
_________________
Gentoo only
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index French 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