LinuxQuestions.org
Register a domain and help support LQ
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-18-2010, 03:11 AM   #1
salimshahzad
Member
 
Registered: Dec 2009
Posts: 200

Rep: Reputation: 15
smb.conf file help needed


dear sir good day

i need help, /etc/samba/smb.conf

what i want a single folder name /app, where user connect via windows machines....but i want to give read/execute/write permission. but delete permission i want to remove. how best can i achive this. as i try below it either stop totally or allow totaly. delete files i cant stop users...


[global]
workgroup = TESTGROUP
server string = TESTMACHINE
hosts allow = 11.11. 127.
log file = /var/log/samba/%m.log
security = user
encrypt passwords = yes
smb passwd file = /etc/samba/smbpasswd
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192

[app]
comment = app
path = /app
browseable = yes
writable = yes
public = yes
read only = yes
 
Old 10-18-2010, 03:41 AM   #2
prayag_pjs
Senior Member
 
Registered: Feb 2008
Location: Pune - India
Distribution: Fedora,RedHat,CentOS,Gentoo
Posts: 1,138
Blog Entries: 4

Rep: Reputation: 147Reputation: 147
Hi,

If as you are giving read write permission to all,its difficult to achieve what you are trying,but if directories in your example directory are /app are written by a single user like root,then by using sticky bit you can prevent users by deleting the contents.

For example if you set sticky bit on /app using

Code:
chmod -R +t /app
Now the user who creates files or directories in it will only be able to delete.
 
1 members found this post helpful.
Old 10-18-2010, 03:44 AM   #3
salimshahzad
Member
 
Registered: Dec 2009
Posts: 200

Original Poster
Rep: Reputation: 15
hello sir apprecaite your support fast

my concern is little

say if admin or root want to delete he can do it.

but users who connect via samba shares let say single userid testsambauser, so if he want he cant delete.

there are executables oracle forms 6i, that need read, execute and write( some cache files). by writing user cant change any files.

advise further.

on samba share what change we do need to do. it is single user, single share samab conf file

kind regards
 
Old 10-18-2010, 03:47 AM   #4
prayag_pjs
Senior Member
 
Registered: Feb 2008
Location: Pune - India
Distribution: Fedora,RedHat,CentOS,Gentoo
Posts: 1,138
Blog Entries: 4

Rep: Reputation: 147Reputation: 147
Hi,

Told you that only the one who creates will only be able to delete the files.

testsambauser will not able to delete files created by other users.

Study about sticky bit.Use google.
 
1 members found this post helpful.
  


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
Samba in Debian, smb.conf: smb passwd file = ?????????? henrnorl Linux - Software 1 10-06-2006 10:43 AM
Help w/ smb.conf file spelltoronto Linux - Newbie 8 08-27-2005 09:35 AM
smb.conf file. vexer Linux - Networking 2 10-17-2004 04:42 AM
Can I still use my old smb.conf file? jspaceman Linux - Networking 2 10-02-2003 12:55 AM
smb.conf file MattLaw Linux - Networking 2 10-01-2003 11:26 AM


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