[Samba] access users homes share
Toby Bluhm
tkbsmb at midwestinstruments.com
Tue Jan 23 17:44:54 GMT 2007
You want the users' share to initially be private? Users can selectively
have another user or users access to their private share?
If that's what you're looking for and samba is the PDC, I would:
[homes]
comment = user share
browseable = no
writeable = yes
create mask = 0660
directory mask = 2770
oplocks = true
Give all users their own private default group and change permissions.
Example: user joe, default group is joe.
Configure joe's directories:
chown -R joe.joe /home/joe
find /home/joe -type d -exec chmod 2770 {}\;
find /home/joe -type f -exec chmod 660 {}\;
If user joe wants to let user jim access his stuff, add jim to joe group.
When joe is tired of jim stomping on his stuff:
remove jim from joe's group
find /home/joe -user jim -exec chown joe {} \;
Sascha wrote:
> yes, but whats the better way ;(
>
> maybe the solution for that is tooo simple so that we cant find it :)
>
> am i the only person who has this problem ?
>
> ----- Original Message ----
> From: Maurício Szabo <mauricio.szabo at gmail.com>
> To: Sascha <tdy_shadow at yahoo.com>
> Sent: Tuesday, January 23, 2007 5:05:46 PM
> Subject: Re: [Samba] access users homes share
>
> Well, you can write "force create mask = 0777" in the user's home share. "user1" and "user2" will both have control of the files in the folder, and no other user will have control because they can't enter on user1 or user2 home share.
>
>
> Besides, I think there must be a better way of doing this :-)
>
> On 1/23/07, Sascha <tdy_shadow at yahoo.com
>
>> wrote:do u mean sticky bit or suid ? that does not work. i looking for a way to let samba do the chmod. something with force user. i currently use force user = %U but that wont work because with that option the user who connects to the share will get the permission.
>>
>
>
> ----- Original Message ----
> From: M Azer <azermina at gmail.com>
> To: Sascha <tdy_shadow at yahoo.com>
> Cc:
> samba at lists.samba.org
> Sent: Tuesday, January 23, 2007 3:36:48 PM
> Subject: Re: [Samba] access users homes share
>
> I hope this is what you are looking for. basically you need to set the sticky bit for the owner - I assume that the user1 home folder is owned by user1.
>
> chmod u+s "user1 home folder"
> this way any file/folder gets created will be owed by user1.
>
> http://www.zzee.com/solutions/chmod-help.shtml
>
>
> On 1/23/07, Sascha <
> tdy_shadow at yahoo.com> wrote:now theres another problem: when i access a share and create a file the user will be forced to %U and not to the user who owns the homes share. when i set force user =%S then everyone can connect to the share.
>
>
> is there a chance that when i give user1 the rights to connect to user2 homes share (via setfacl) and user1 creates a file that this file will be chown to user2. i dont want to create a special share or groups because when i do it that way i would have 50 extra shares in my
>
> smb.conf.
>
> thanks for your help again and best regards
>
> ----- Original Message ----
> From: Sascha <tdy_shadow at yahoo.com>
> To:
>
> samba at lists.samba.org
> Sent: Tuesday, January 23, 2007 12:39:20 PM
> Subject: Re: [Samba] access users homes share
>
> thanks for your help. i just did a setfacl on the users home directory and i could access it. really nice :)
>
>
>
> thanks again for the help
>
> best regards
>
> ----- Original Message ----
> From: Maurício Szabo <mauricio.szabo at gmail.com>
> To: Sascha <
>
> tdy_shadow at yahoo.com>
> Sent: Tuesday, January 23, 2007 12:27:32 PM
> Subject: Re: [Samba] access users homes share
>
> You can add user1 to a group that user2 is currently in, and set permissions of the user2 home share to be "group-readable".
>
>
>
> For example, user2 is a member of the group "foo", so you can add user1 to "foo" group, add user2's home share to "foo" group, and finally do a chmod g+wxr to user2's home folder.
>
>
>
>
> On 1/23/07, Sascha <tdy_shadow at yahoo.com> wrote:
> hey list,
>
> we are currently migrating our users from novell to samba. now we have one problem: in novell we could give
>
> e.g. user1 access to users2 home share so he could modify, delete or add files on this share. in samba we defined a global homes share that is mapped on logon. so how can we give user1 the needed rights?
>
> here is the definition of the homes share in
>
> smb.conf:
>
> [homes]
> comment = user share
> browseable = no
> writeable = yes
> write list = %U
> create mask = 0600
> directory mask = 0700
>
> force user = %U
>
>
> force group = Administrators
> oplocks = true
>
> do we need to add a special share and group?
>
> thanks for help and best regards
>
>
>
>
--
-Toby
More information about the samba
mailing list