LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-27-2012, 04:14 AM   #1
unibox
Member
 
Registered: Dec 2011
Location: India
Distribution: Centos,redhat,zentyal
Posts: 43
Blog Entries: 1

Rep: Reputation: Disabled
samba- folder browsable only one user


Hi friends,

I am using centos-5 for samba server. also i have created 3 samba user's for folder access
i.e:
user1
user2
user3

folder path
path= /data

now i want to view the /data folder only for user1. i tried many ways but it's not work.

if you know, please give the solution for this same.
 
Old 01-27-2012, 05:43 AM   #2
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: RHEL 7.x, SLES 11 SP2/3/4
Posts: 1,195
Blog Entries: 4

Rep: Reputation: 221Reputation: 221Reputation: 221
in smb.conf

under data share use this option

Code:
valid users = user1
 
Old 01-27-2012, 05:58 AM   #3
centos123
Member
 
Registered: Apr 2011
Posts: 397

Rep: Reputation: 16
type

valid user = user1 in smb.conf

set permisssion 700 for /data

this permission willnot allow other user to access your /data directory...
 
1 members found this post helpful.
Old 01-27-2012, 07:27 AM   #4
unibox
Member
 
Registered: Dec 2011
Location: India
Distribution: Centos,redhat,zentyal
Posts: 43

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
Hi deep27ak & centos123 thanks for reply.

that's ok

but the user1 only want to view the /data folder, other user don't want to view the /data folder.

i.e:
Samba user's
user1
user2
user3

sharing directory
/data
/admin

i.now the user1 only view the /data directory
ii. other user2 & user3 only view the /admin directory

it's possible........?

Last edited by unibox; 01-27-2012 at 07:36 AM.
 
Old 01-27-2012, 07:36 AM   #5
yathishGn
LQ Newbie
 
Registered: Jan 2012
Posts: 1

Rep: Reputation: Disabled
Under the share, in sbm.conf
Make an entry-
read only = yes
valid user = user1
writable = no

Last edited by yathishGn; 01-27-2012 at 07:55 AM.
 
1 members found this post helpful.
Old 01-27-2012, 07:43 AM   #6
unibox
Member
 
Registered: Dec 2011
Location: India
Distribution: Centos,redhat,zentyal
Posts: 43

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
Hi yathishGn thanks for reply.

but my question is user1 only have to browse /data directory, user2 & user3 only have to browse /admin directory.
 
Old 01-27-2012, 07:46 AM   #7
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: RHEL 7.x, SLES 11 SP2/3/4
Posts: 1,195
Blog Entries: 4

Rep: Reputation: 221Reputation: 221Reputation: 221
Code:
[data]
comment = my share
path = /data
valid users = user1
public = no
writable = yes
browseable = yes
read only = no


[admin]
comment = my share1
path = /admin
valid users = user2 user3
public = no
writable = yes
browseable = yes
read only = no
 
1 members found this post helpful.
Old 01-27-2012, 09:26 AM   #8
unibox
Member
 
Registered: Dec 2011
Location: India
Distribution: Centos,redhat,zentyal
Posts: 43

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
Hi deep27ak thank's

i followed your instruction. but still the /data /admin directory showing for all user's(user1 user2 user3).

/data directory permission : 700
/data owner & group : user1:user1

Last edited by unibox; 01-27-2012 at 09:53 AM.
 
Old 01-27-2012, 03:23 PM   #9
ravi6289
LQ Newbie
 
Registered: Jan 2012
Posts: 5

Rep: Reputation: Disabled
Did you restart daemons ?
 
Old 01-28-2012, 03:36 AM   #10
unibox
Member
 
Registered: Dec 2011
Location: India
Distribution: Centos,redhat,zentyal
Posts: 43

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
yes, i have restarted many time's using this command

service smb restart
service smb reload

but still i am facing same problem.

Last edited by unibox; 01-28-2012 at 06:33 AM.
 
Old 01-28-2012, 06:37 AM   #11
cbtshare
Member
 
Registered: Jul 2009
Posts: 645

Rep: Reputation: 42
I would suggest you then create 2 groups and add the users who are to view a share in one and who are to write in another and use chmod g+ to assign permissions.Then the samba config should work fine.

Last edited by cbtshare; 01-28-2012 at 06:39 AM.
 
Old 01-28-2012, 10:24 AM   #12
unibox
Member
 
Registered: Dec 2011
Location: India
Distribution: Centos,redhat,zentyal
Posts: 43

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
Hi cbtshare thank's for reply. i will try and let you know.
 
Old 01-29-2012, 09:24 PM   #13
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: RHEL 7.x, SLES 11 SP2/3/4
Posts: 1,195
Blog Entries: 4

Rep: Reputation: 221Reputation: 221Reputation: 221
Quote:
Originally Posted by unibox View Post
Hi deep27ak thank's

i followed your instruction. but still the /data /admin directory showing for all user's(user1 user2 user3).

/data directory permission : 700
/data owner & group : user1:user1
that must be from the cache

recheck on different machine on the same settings which I have given you
 
Old 01-30-2012, 12:30 AM   #14
unibox
Member
 
Registered: Dec 2011
Location: India
Distribution: Centos,redhat,zentyal
Posts: 43

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
Hi deep27ak,

i tried different machine also, but i got same result(/data directory showing for all user's).
 
Old 01-30-2012, 12:38 AM   #15
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: RHEL 7.x, SLES 11 SP2/3/4
Posts: 1,195
Blog Entries: 4

Rep: Reputation: 221Reputation: 221Reputation: 221
Om now I get the word "view"

So you want user1 only want to view the /data folder and invisible for others.

well I am not very sure if you can do that because if you are sharing any directory means it will visible all over the network. the only thing you can do is give permissions as per your requirement.

so that the directory is not used by any other third person.
 
1 members found this post helpful.
  


Reply



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
Samba home directories make browsable as guest markotitel Linux - Server 15 12-05-2011 04:54 AM
Making a folder browsable samnjugu Linux - Server 18 05-20-2007 04:39 PM
quick Samba question....browsable? security related.... Basslord1124 Linux - Networking 2 12-16-2006 12:08 PM
Samba User Folder canuck_barlow Linux - Newbie 3 09-28-2006 02:11 PM
Home folder not browsable or viewable koflanagan Linux - Software 6 03-29-2005 01:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:32 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration