samba instead of nfs

30/06/2010 - 07:34 von Vitus Jensen | Report spam
Hej!

As I have to open my server to windows users anyway I would like switch
linux clients to cifs from nfs, too. Problem is that on each linux
client there are several users who create files on the server and I need
the owner of the file kept together with the file. With nfs it's "simple"
by keeping uids insync between server and all clients. With cifs the file
always gets the login name of client as owner :-(

vitus@client$ touch as-vitus
oe@client$ touch as-oe
nobody@client$ touch as-nobody
root@client# touch as-root

ls -l
-rw-r--r-- 1 vitus users 0 30. Jun 07:20 as-root

Client: linux 2.6.27, mount.cifs 1.10
Server: reiserfs user_xattr, smbd Version 3.2.8

Is this possible at all? Which part is responsible? xattr, acls? On
client mounts or should the server filesystem support something special?
acl is currently not enabled on reiserfs mounts.

Vitus

Vitus Jensen, Hannover, Germany, Earth, Universe (current)
 

Lesen sie die antworten

#1 G
30/06/2010 - 23:29 | Warnen spam
Vitus Jensen wrote:

As I have to open my server to windows users anyway I would like switch
linux clients to cifs from nfs, too. Problem is that on each linux
client there are several users who create files on the server and I need
the owner of the file kept together with the file. With nfs it's
"simple" by keeping uids insync between server and all clients. With
cifs the file always gets the login name of client as owner :-(



This is by design. Always distinguish between the id used for
authentication and the id requested for the mounted file system.

Is this possible at all? Which part is responsible? xattr, acls? On
client mounts or should the server filesystem support something special?
acl is currently not enabled on reiserfs mounts.



Generally speaking the basic layout is to mount based on users and not on
hosts. So given you want to give users on the client machine access to
their home directories located on the server you will not, like it is
common with NFS, do a single mount for the entire home directory tree,
but mount single home directories on user request, e.g. controlled by
pam.mount upon login.
CIFS, like NCP, allows to give the umask and user/group settings as a
mount option (uid and gid). Permissions on the server are controlled by
the file system and the samba server configuration.
If the server is running Linux/Unix it should have a common user base
with the client (NIS, LDAP etc) kept in sync with the samba server and
it's SID database. ACL is not necessary in a simple setup.
Or to cut a long story short: stay away from CIFS for the Linux clients
and use NFS for these ;-)

Günther

Ähnliche fragen