[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Access to NFS-server



Andreas Tille wrote:
> 
> Hallo,
> 
> because of a lack of diskspace I want to use another computer
> (HP-Workstation) as NFS-server. So I installed the base disks
> of debian and wanted to move /usr to the NFS server by
> 
>    tar -cf usr.tar /usr
> 
> and
> 
>    tar -xf usr.tar
> 
> in the approriate directory of the server mounted via NFS.
> But I got:
> 
> tar: Cannot change mode of file <...> to <644/755>: Operation not permitted
> 
> for each file which is untared. The files exists after this mess of
> errormessages and have the right rights but the owner is root (the root
> of the server) and so
> 
>    rm -r usr
> 
> ends with
> 
> rm: <...> : Permisssion denied.
> 
> OK, the reason is that the information in /etc/exports of the NFS-Server
> is not correct. I played around with several combinations of
> 
> /usr/local/linux -access=<my.pc>
> /usr/local/linux -access=<my.pc>,root=<my.pc>
> /usr/local/linux -rw=<my.pc>
> ....
> 
> Please don't ask me what ever I tried but nothing helped. Yes I did not
> forget to call exportfs -a after every change in /etc/exports.
> 
> Is anybody out there who knows the right way to setup the server
> correctly????
> 
> Any help appreciatet
> 
>     Andreas.

I think what you need is an entry in root's .rhosts file on the server
machine.  Login as root on the server and add my.pc to the .rhosts file
in root's home directory.  If the file doesn't exist, create it.  Make
sure you chmod 0600 so others cannot change the file.

You may want to do the converse on my.pc to allow the root user on the
server to be equivalent to root on my.pc.  An alternate way to transfer
the files to the server while logged in as root on the server is:

cd <target_directory_on_server>
rsh my.pc "cd /usr; tar cf - ." | tar xf -

--Bob


Reply to: