LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 02-14-2003, 02:25 PM   #1
gauge73
Member
 
Registered: Jan 2003
Location: Dallas, TX
Distribution: Fedora Core 4
Posts: 420

Rep: Reputation: 30
Security-Related Question


This is going to be a multi-faceted question. I want to solve this issue, but I want to understand how the solution works, too.

The issue is with a share on my samba server. I have a file that is very vital that I don't want to lose. However, I want my wife (who is a clutz and could delete the file) to be able to view it. So, I gave her permissions to read the file, but not to write to or execute it. I sat at her computer and tried to edit the file to verify that she didn't have the rights. Well, she did. From her computer using her username I was able to edit the file and save my changes.

She did have write permissions to the share, however. I looked in my smb.conf and found that there was no security=user line in there. I think I know what the issue is and how to solve it, but I want to verify that I have a complete understanding of the situation. The following is how I understand things to work currently. Please point out any flaws in this.

smbd is a service running on my Linux box. The owner of this service is root, and therefore this service has complete access to all files unless otherwise stated. When my wife connects to my computer, she is connecting to this service, and thus when she tries to access the files, she can do so with root access. The service itself has to deny her access to files and shares because the OS will not (because it will always allow a root-owned service access unless permissions dictate otherwise). Thus, the problem is with my setup of the service (which means the problem is in smb.conf). The problem I have in the smb.conf file is that I don't have a security=user line. The default is security=share (please verify this, because it's a question I haven't answered yet). Because my wife has write access to the share, and smbd is using share-level security, she has permission to write to the entire share regardless of file permissions. If I change security to user-level, then smbd will verify that she has file permissions and therefore she will not be able to write to the vital file in question.


Thank you all for helping. I will graduate from being a newbie some day, but only with your help.
 
Old 02-14-2003, 02:40 PM   #2
ferreter
Member
 
Registered: Oct 2002
Location: USA, IL
Distribution: Debian/Gentoo/Slack
Posts: 215

Rep: Reputation: 30
First of all this should be in the security thread.

Other than that, running a daemon as another user besides root is just a good security measure in case the service gets hacked. (buffer overflow, et cetera). You should definately set the security permissions to user and not share, share can only be applied to folders and not files (at least it does in windows if its different in samba let me know guys). You can feel free to post the area of smb.conf for further investigation of course
 
Old 02-14-2003, 04:00 PM   #3
gauge73
Member
 
Registered: Jan 2003
Location: Dallas, TX
Distribution: Fedora Core 4
Posts: 420

Original Poster
Rep: Reputation: 30
So I was correct about the daemon having root permissions, and thus the daemon has to deny access, because the OS won't? I want to make sure I understand that.
 
Old 02-15-2003, 05:20 PM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
AFAIK ferreter is right about security=user level. security=user means per-file authentication, while security=share means a user gets authenticated when entering the share and basically everything after is just fine (or not).
Maybe another solution is just to chattr +iu the file?
 
  


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
c related question. blackzone Programming 1 07-24-2004 08:55 AM
Which OS is best for network security related..... phr0stbyt3 Linux - Security 6 03-09-2004 09:42 PM
DNS related question tusher Linux - Networking 1 12-01-2003 09:15 AM
Queston about logs, related to security pembo13 Linux - Security 4 09-25-2003 05:16 PM
Yet another question; TimeZone related MasterC Linux From Scratch 6 06-11-2002 03:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 07:10 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
Open Source Consulting | Domain Registration