ubuntu fileserver

battletoad

Expert Member
Joined
Mar 10, 2009
Messages
1,461
Reaction score
52
If anyone can help it'd be much appreciated.

I want to setup an Ubuntu fileserver. Clients will be connecting to fileserver with windows XP and Ubuntu 10.


What I've done so far:

1. Ubuntu 11.04 "fileserver" on 192.168.0.10 (hereafter pc10)
2. Computers 192.168.0.1-9 (hereafter pc1-pc9) running either XP or ubuntu 10. Say users are Bob1 - Bob9
3. add users Bob1-Bob9 on pc10, added them as samba users (sudo smbpasswd -a BobX)
4. Share BobX's home folder on pc10

If I leave BobX's home folder permission as is (wrx-rx-rx), all of them can connect to any user's home folder (e.g. Bob1 can explore Bob2's home folder), but if I chmod 700 each folder, neither of them can connect to their own folders (Bob1 cant open his own home folder in windows).

I am thinking the problem lies with the permissions, but i cant track down where I should set the permissions explicitly. Shares-admin just lets me set permissions for all the shares, not for specific shares as far as I can tell. What am I doing wrong?

tl;dr: would like to set user accounts for each share folder for access, and only specific credentials open their corresponding shared folder
 
Just thinking quickly: Remember that there are 2 aspects to permissions in linux.

Rights and Ownership.

I would probably create a group Users, Bob1 to Bob10 will all be part of the Users group.

Then you need to change ownership on all the shares:

chown -R bob1:users /bob1/share

You can now decide how you want the rights to work: do you want everybody to be able to read the files, but just the user to write to it? Then chmod g+r type thing, or however you want it.
 
Thx man, but after going thru smb.conf I uncommented a few lines to make it work.

I'd still want to use your method just for interest's sake tho, so I'll fire up a VM.
 
Top
Sign up to the MyBroadband newsletter
X