LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 10-05-2006, 09:15 AM   #1
phildacey
LQ Newbie
 
Registered: Nov 2005
Posts: 11

Rep: Reputation: 0
setting samba read/write permissions for seperate users


Hello all,

I'm having trouble finding out how to share folders with specific access permissions for each user so I thought I'd ask. I'm using samba and this is the set up:

[Ubuntu box] - should be able to read/write to all folders shared on [server box]

[Xp Box] - should be able to read/write to all folders shared on [server box]

[xp Box2] - should have read only access to all folders shared on [server box]

[xp Box3] - should have read only access to all folders shared on [server box]

[xp Box4] - should have read only access to all folders shared on [server box]

Eventually, I'll get round to sharing the home directories on all machines but at the moment I just want to achieve the above. Thanks in advance : )
 
Old 10-05-2006, 11:02 AM   #2
TylerD75
Member
 
Registered: Aug 2004
Location: Norway
Distribution: Gentoo
Posts: 94

Rep: Reputation: 17
If you've got unique user names on each computer:
Let's say you have these users: ubox, box1, box2, box3, box4?
1. I'll assume you've added these users to both the ubuntu users and the samba users.
2. You might want to add these users to a group called ex. shareusers, then change group on all shares to this group name.
3. Now you change owner of all shares to ubox, and set his access rights to read and write: chmod -R 0644 <sharename>.
The above command will also set the groups access rights to read, and everyone else to read.

You could also do the same without adding all users to the group you created, but then you need to use force group = shareusers, which will in effect cause all logons to use the group shareusers. This has to be added to each of the share definitions in smb.conf.

As you can see by this, the samba share rights are handled exactly the same way as access rights locally on any linux system.
This is the reason you have to create a linux user (or an alias) for each samba user. So that linux knows what user the network access is operating as.

Hope this helps?

Last edited by TylerD75; 10-05-2006 at 11:03 AM.
 
Old 11-06-2006, 01:23 PM   #3
phildacey
LQ Newbie
 
Registered: Nov 2005
Posts: 11

Original Poster
Rep: Reputation: 0
thanks

Thanks Tyler, great advice. I'm all sorted now : )
 
Old 11-07-2006, 04:09 AM   #4
TylerD75
Member
 
Registered: Aug 2004
Location: Norway
Distribution: Gentoo
Posts: 94

Rep: Reputation: 17
Good to hear!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
trouble setting Read/Write permissions on vfat partitions mboxbg Linux - Newbie 1 02-17-2006 08:00 AM
samba, some users read, others write? softmoo Linux - Networking 1 07-06-2005 11:13 AM
Samba ignoring read/write permissions? GT3NE1 Linux - Software 0 08-30-2004 05:23 PM
SAMBA Read/Write permissions Tenover Linux - Newbie 5 11-04-2003 12:45 PM
How to set permissions to read, execute, write for users only chupacabra Linux - General 3 12-18-2002 03:54 PM


All times are GMT -5. The time now is 03:13 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration