Unix/Linux Go Back    


Windows & DOS: Issues & Discussions All Windows and DOS questions should go here as well. Discuss UNIX to Windows (Desktop or Server) here!

Samba file structure

Windows & DOS: Issues & Discussions


Closed    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 01-29-2015
p2bas p2bas is offline
Registered User
 
Join Date: Dec 2014
Last Activity: 29 January 2015, 3:22 PM EST
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Samba file structure

Hi,

My manager asked me to create the same file structure in the new Redhat 6 server, using samba, with the one already used on the windows server for file sharing.

For example,


Code:
Parent Folder 
        Child Folder 
        Child Folder 2

and so on

The issue now is that windows will allow you to share the Parent folder to everyone and then you can choose different permissions for the Child folders, where in samba the permissions are applied per share. So when the user will browse the server he will have to see all share folders listed instead of just one file (Parent). Symlinks cannot be used when applying CIFS so i cannot restrict or allow access

What am i doing wrong? Is there any way around the issue apart from the security that can be applied through samba or this is the way that i will have to work using linux?

Last edited by jim mcnamara; 01-29-2015 at 09:13 AM..
Sponsored Links
    #2  
Old Unix and Linux 01-29-2015
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
 
Join Date: Feb 2004
Last Activity: 24 June 2017, 10:27 PM EDT
Location: NM
Posts: 11,091
Thanks: 536
Thanked 1,067 Times in 989 Posts
I'm guessing I do not have a full understanding so please give me some help here.

The parent filesystem is on a Windows box.
John is a windows user. John can only view files in 'Child Folder 2'.

Can you have, on the Linux box, just a Child Folder 2 directory? Asked another way Does it have to be:
/Parent/child 2, or can it just be /child 2
So you have lots of /child n directories, but no parent directory?

BTW UNIX has directories, Windows has folders.
Sponsored Links
    #3  
Old Unix and Linux 01-29-2015
p2bas p2bas is offline
Registered User
 
Join Date: Dec 2014
Last Activity: 29 January 2015, 3:22 PM EST
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
John is a Windows user.

Redhat Server has been joined to the same domain with John.

I have implemented Samba on the Redhat server that will be used for file sharing, all files are located on samba server. Sharing one single directory /media/Data/Share for a specific group or user works just fine.

Now, is there a way i can create a structure in a way that when John browses the samba server from his explorer, will see only one directory (Share) and inside that the other directories (Share/Child, Share/Child1,Share/Child2...).

Note that different security permissions have to be applied to Share/Child directories for other users as well. Like NTFS permissions in a Windows box (Different security permissions for each folder without changing the Master share), see below link

https://www.dropbox.com/s/b2eyf1j3lx...pture.JPG?dl=0

Srv1 Share the CompanyData folder but each file inside has different security persmisions in order to allow or block access. In order to do that in samba i had to create a new share for all these folders so i can apply different security persmisions to each folder

Last edited by p2bas; 01-29-2015 at 10:54 AM..
    #4  
Old Unix and Linux 01-29-2015
Corona688 Corona688 is offline Forum Staff  
Mead Rotor
 
Join Date: Aug 2005
Last Activity: 23 June 2017, 6:44 PM EDT
Location: Saskatchewan
Posts: 22,254
Thanks: 1,105
Thanked 4,198 Times in 3,883 Posts
File permissions in Samba depend on file permissions in UNIX. To restrict a Win users' permissions, restrict the matching UNIX users' permissions.

You can add this to a share's settings:


Code:
[TheShare]
   ...
   path = /path/to/%u
   hide unreadable = yes

...to make its path dynamic, and to hide a share if a user doesn't have access to read it. %u means 'username', see 'man smb.conf' for what other substitutions are available.
Sponsored Links
Closed

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Copy certain file types recursively while maintaining file structure on destination? rockf1bull Red Hat 1 06-14-2011 09:04 AM
compare XML/flat file with UNIX file system structure shafi2all Programming 6 08-15-2008 02:15 AM
Search attributes in one structure using the values from another structure dhanamurthy Programming 3 03-27-2008 03:37 AM
file structure yoavbe Shell Programming and Scripting 7 10-16-2007 06:27 AM
Copying a Directory Structure to a new structure jhansrod UNIX for Dummies Questions & Answers 8 07-27-2005 06:24 AM



All times are GMT -4. The time now is 11:33 PM.