LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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, 02: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, 02:41 AM   #2
prayag_pjs
Senior Member
 
Registered: Feb 2008
Location: Pune - India
Distribution: RHEL/Ubuntu/Debian/Fedora/Centos/K3OS
Posts: 1,159
Blog Entries: 4

Rep: Reputation: 149Reputation: 149
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, 02: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, 02:47 AM   #4
prayag_pjs
Senior Member
 
Registered: Feb 2008
Location: Pune - India
Distribution: RHEL/Ubuntu/Debian/Fedora/Centos/K3OS
Posts: 1,159
Blog Entries: 4

Rep: Reputation: 149Reputation: 149
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



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 09:43 AM
Help w/ smb.conf file spelltoronto Linux - Newbie 8 08-27-2005 08:35 AM
smb.conf file. vexer Linux - Networking 2 10-17-2004 03:42 AM
Can I still use my old smb.conf file? jspaceman Linux - Networking 2 10-01-2003 11:55 PM
smb.conf file MattLaw Linux - Networking 2 10-01-2003 10:26 AM

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

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