LinuxQuestions.org
Help answer threads with 0 replies.
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 09-16-2007, 09:48 PM   #1
willie118
LQ Newbie
 
Registered: May 2007
Location: China
Posts: 15

Rep: Reputation: 0
How to use samba implementing some files can visible and some files can not visible


A files server on linux. I use the samba. security = ADS.

Many Windows PC access the server. There is a directory have 10 files.6 files some users, like guest, have no privilege to read it. how to hide the 6 file for some users?

If can not hide files for somebody, Forbid "Copy" is also ok.

Thanks
 
Old 09-16-2007, 11:44 PM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Is it only guest users that you don't want to read files. Do you want them to be forbidden from reading all the files in the share or only those 6 files. If it is only 6 files of many that certain users are not allowed to read, then I think you want to use nt acl's in windows or posix acls in Linux (setfacl) and use the option "nt acl support = yes".

It may be easier to put these files somewhere else like in their own directory and control access to the directory.
 
Old 09-17-2007, 12:36 AM   #3
willie118
LQ Newbie
 
Registered: May 2007
Location: China
Posts: 15

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by jschiwal View Post
Is it only guest users that you don't want to read files. Do you want them to be forbidden from reading all the files in the share or only those 6 files. If it is only 6 files of many that certain users are not allowed to read, then I think you want to use nt acl's in windows or posix acls in Linux (setfacl) and use the option "nt acl support = yes".

It may be easier to put these files somewhere else like in their own directory and control access to the directory.
I'm very sorry to not explain clearly. I have used the ACL in Linux. If I set this 6 files someuses not allowed to read, users also can see it or copy it.

I want to forbid all user can not copy this 6 files except some user that have privilege. So I try to hide them, but not successful.
 
Old 09-17-2007, 03:06 AM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Create a group for the users allow to read the files, and make this group the owner. For the "security = domain" model, I think that you need to map this group to a Windows group. Scan through your servers smb.conf file. If there is an "add group script" and you use Windows NT domain administration tools, then you can use those tools to create a new group and do the mapping.

I don't think that you can make a file invisible for certain users, but you can restrict access.

You probably want to look and see if you have a samba-doc package. It contains 3 books including the Samba 3 Howto & Reference Guide. Look at the chapters starting with Chapter 12.

It may be possible that with your current configuration, you can log into the network with a network admin username/password and use the windows tools to create a new group, add users to the group, restrict access to the files to members of this group or to users using Windows ACLs.

I think you would save yourself a lot of work if this 6 files were located in a separate share and you used a samba access control list to control who has access to the share. For example, you could list the users in the "valid users =" parameter for that service.

I use "security = user" instead of domain, so I could have easily missed something that may be easier. Good Luck!
 
Old 09-17-2007, 04:32 AM   #5
willie118
LQ Newbie
 
Registered: May 2007
Location: China
Posts: 15

Original Poster
Rep: Reputation: 0
Very thank you for you reply. I could not forbid users access this 6 files, because there is a program must use this 6 file.
For example, the program is a MSN, it need 6 DLL files. A guest account can use MSN. so the guest account must has privilege to access this 6 DLL files.
But, I don't want the guest account copy the 6 DLL files to locate PC. Is the samba can forbid copy, but allow access ? Or, have other method solve this problem.
 
Old 09-17-2007, 08:49 PM   #6
willie118
LQ Newbie
 
Registered: May 2007
Location: China
Posts: 15

Original Poster
Rep: Reputation: 0
Is anybody can help me?
thanks.
 
Old 09-17-2007, 10:26 PM   #7
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
The process of accessing them involves reading them. It is the same process so you can't do one and forbid the other.
 
Old 09-18-2007, 12:27 AM   #8
willie118
LQ Newbie
 
Registered: May 2007
Location: China
Posts: 15

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by jschiwal View Post
The process of accessing them involves reading them. It is the same process so you can't do one and forbid the other.
I know.Thank you very much. I will attempt other.
 
  


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 not visible bobb_roof Linux - Enterprise 8 10-03-2006 03:44 AM
Samba: Only first letter of shared files visible betonarbejder Linux - Networking 0 09-25-2006 03:18 PM
ftp server - Pure ftp - logs in OK but no files visible tp11235 Linux - Networking 2 08-30-2005 05:11 AM
Samba share not visible kochuthara Linux - Software 5 02-25-2004 03:04 AM
Making files visible under wuftp Florian Linux - Software 5 09-25-2002 03:49 PM

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

All times are GMT -5. The time now is 03:21 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