LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-06-2013, 06:02 PM   #1
esso82
Member
 
Registered: Aug 2013
Location: Plymouth, UK
Distribution: SolydK
Posts: 45

Rep: Reputation: Disabled
Directories visible to their users only


Hello,

I have a share set in samba and there are all shared files, but I want to create one directory for each user and that would be visible on their computers only, so if they click in windows on the network drive they will see:

network share called 'Data' and then:

Directories on Peter's computer: _Peter Music Video
Directories on John's computer: _John Music Video
Directories on Lucas's computer: _Lucas Music Video

I hope you understand what I aim to do. Is that possible? I tried to chown and 700 those dirs to their users but they are still visible to the others and it looks quite messy. Can anyone help? Thanks for any advices
 
Old 10-06-2013, 07:37 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 14,950

Rep: Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530
If your smb.conf has a [homes] section then you already have that capability. samba will automatically creates home shares i.e path = /home/username for each user. When the user logs into the server they will see a folder labelled with their username.

In the same fashion it is also possible automatically to create a common share name but points to a path based upon the user name.
 
1 members found this post helpful.
Old 10-07-2013, 07:58 AM   #3
esso82
Member
 
Registered: Aug 2013
Location: Plymouth, UK
Distribution: SolydK
Posts: 45

Original Poster
Rep: Reputation: Disabled
thanks for answer michael

I know I can use homes but they are on / filesystem with only limited space to be used, and above all I want to keep it simple, that means, in windows - map 1 network drive where is everything i.e. shared files plus one private directory for each user. I hoped that if I 700 the directory it only will be visible to the owner but it is visible to everyone (though unaccessable) and it looks a bit messy.

I'm a linux rookie so I'll ask, if I make hidden directories, would they be visible to everyone as well? I ask because I don't know yet, how to make a directory hidden.
 
Old 10-07-2013, 10:39 AM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 14,950

Rep: Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530
You can create a hidden directory just by adding a . to the front of the name i.e. mkdir .hidden_dir. It will be hidden to all users but still a bit messy. Here is my first attempt to something fairly clean. So common or whatever you want to call the share with the proper permissions will be accessible and visible to all. The private directory works similar to [homes] and they will all see a private share but when accessed it will be their /data/username directory.

[common]
path = /data/common
browsable = yes
...

[private]
path = /data/$u
browsable = no
...
 
Old 10-07-2013, 04:57 PM   #5
esso82
Member
 
Registered: Aug 2013
Location: Plymouth, UK
Distribution: SolydK
Posts: 45

Original Poster
Rep: Reputation: Disabled
I see, still not my desired one mapped drive but if there is no other solution, I'll do it this way ...

thanks michael

EDIT: I was googling about this and came accross an attribute of a share called hide unreadable. Didn't know it exists but will give it a try..... as soon as I'll come home lol

Last edited by esso82; 10-07-2013 at 05:27 PM.
 
Old 10-07-2013, 06:05 PM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 14,950

Rep: Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530
That should work too...
 
Old 10-07-2013, 06:31 PM   #7
esso82
Member
 
Registered: Aug 2013
Location: Plymouth, UK
Distribution: SolydK
Posts: 45

Original Poster
Rep: Reputation: Disabled
yes that work exactly the way I wanted
btw. symlinks just crossed my mind, but that'd need to create separate share for every user, anyway, this is what I was after
 
Old 10-07-2013, 06:33 PM   #8
michaelk
Moderator
 
Registered: Aug 2002
Posts: 14,950

Rep: Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530
You can mark this thread as solved via the thread tools at the top.
 
  


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
files and directories created under ocfs2 visible from only one node bweaver Linux - Virtualization and Cloud 0 05-23-2011 11:43 AM
samba server does not let my windows machine to see files but directories are visible linux hates me Linux - Networking 3 06-09-2009 09:47 PM
users not visible linuxguy08 Solaris / OpenSolaris 3 04-22-2008 02:59 PM
LDAP users not visible. Quiet1 Linux - Software 0 02-26-2007 09:00 PM
samba: home directories not visible flipboi Linux - Networking 1 05-28-2004 12:06 AM


All times are GMT -5. The time now is 02:07 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration