LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 12-20-2010, 03:10 AM   #1
fareedreg
Member
 
Registered: Dec 2007
Posts: 51

Rep: Reputation: 15
samba share


How can i protect my samba share files from users deletion. Suppose I have a samba share like

[Email]
comment = Email
path = /home/kpsn/email
browseable = yes
writable = yes
valid users = xyz,abc,
admin users = xyz,abc
read only = no

User xyz & abc can easily delete any file because they have write and read permission in this directory..

I want Read and write will allow but delete will protect.

Is any option or trick is available in samba?
 
Old 12-20-2010, 04:06 AM   #2
Agrouf
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: LFS
Posts: 1,591

Rep: Reputation: 79
You should look at this part of the samba documentation:
http://www.samba.org/samba/docs/man/...html#id2611627
I believe there is no point in allowing someone to write to a file but not delete it. That someone could just remove all content so what is the difference between emptying the file and removing it? Do you have a special purpose that would use this feature?
 
Old 12-20-2010, 04:22 AM   #3
djsmiley2k
Member
 
Registered: Feb 2005
Location: Coventry, UK
Distribution: Home: Gentoo x86/amd64, Debian ppc. Work: Ubuntu, SuSe, CentOS
Posts: 343
Blog Entries: 1

Rep: Reputation: 72
Quote:
Originally Posted by Agrouf View Post
You should look at this part of the samba documentation:
http://www.samba.org/samba/docs/man/...html#id2611627
I believe there is no point in allowing someone to write to a file but not delete it. That someone could just remove all content so what is the difference between emptying the file and removing it? Do you have a special purpose that would use this feature?
A log file.... yeah of course something could empty the file, but maybe the file needs to "exist" for an application to work?
 
Old 12-20-2010, 04:28 AM   #4
fareedreg
Member
 
Registered: Dec 2007
Posts: 51

Original Poster
Rep: Reputation: 15
Thanks for your replay ... CAN we make directory delete protected?
 
Old 12-20-2010, 09:25 AM   #5
Agrouf
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: LFS
Posts: 1,591

Rep: Reputation: 79
Edit:
chmod o+t may be what you are looking for, provided the user of the directory is rightly set.

Last edited by Agrouf; 12-20-2010 at 09:35 AM.
 
Old 12-21-2010, 01:57 AM   #6
raviteja_s
Member
 
Registered: Jun 2010
Location: India
Distribution: Redhat
Posts: 68

Rep: Reputation: 1
use this

#chattr +i /home/kpsn/email
 
Old 12-21-2010, 03:55 AM   #7
Agrouf
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: LFS
Posts: 1,591

Rep: Reputation: 79
chattr +i does not work on ext2/3/4 AFAIK.
 
  


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
can't mount samba share and then write to the share calbazon Linux - Software 8 10-10-2010 02:35 AM
mount windows share export to samba share -> improve network performance tuning newuser77 Linux - Server 1 07-23-2008 12:28 PM
show the samba share but can't mount the share badall Linux - Server 3 05-30-2007 05:24 AM
searching samba share breaks connection to share Elomis Linux - Server 1 05-11-2007 01:28 AM
Simple Samba Setup, Share & Not Share timmywo Linux - Software 4 07-30-2004 08:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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