LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 03-24-2007, 01:17 PM   #1
jakev383
QmailToaster Developer
 
Registered: Dec 2005
Location: Burlington, NC
Distribution: CentOS, Voyage, Debian, Fedora
Posts: 220

Rep: Reputation: 31
Need suggestions on samba setup


I have need to set up a samba share where users can add/modify files all they want, but nobody will be able to delete files without a password. It'd be nice to keep a log of who deleted what and when if possible.
Worst case is setup samba to move the files a user wants to delete to a "trash bin" to be deleted by an admin later.
Has anyone setup anything similar? I currently run 2 samba shares - on one all users use the same user/pass (guest ok) where they have full access. I have another where a separate user/pass is used by all users that only a few users have access to.
All users are of course running XP Home or Pro, with no domain controller present.
Thanks in advance.
 
Old 03-24-2007, 08:18 PM   #2
lavacano201014
LQ Newbie
 
Registered: Mar 2007
Distribution: some sort of Debian Kanotix
Posts: 11

Rep: Reputation: 0
I haven't even got Samba to WORK on my machine here, but try surfing through any and all configuration files and interfaces. Set a nodelete somewhere and do that "trash bin" thing.
 
Old 03-29-2007, 07:53 AM   #3
jakev383
QmailToaster Developer
 
Registered: Dec 2005
Location: Burlington, NC
Distribution: CentOS, Voyage, Debian, Fedora
Posts: 220

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by jakev383
I have need to set up a samba share where users can add/modify files all they want, but nobody will be able to delete files without a password. It'd be nice to keep a log of who deleted what and when if possible.
Worst case is setup samba to move the files a user wants to delete to a "trash bin" to be deleted by an admin later.
Has anyone setup anything similar? I currently run 2 samba shares - on one all users use the same user/pass (guest ok) where they have full access. I have another where a separate user/pass is used by all users that only a few users have access to.
All users are of course running XP Home or Pro, with no domain controller present.
Thanks in advance.
To answer my own post:
I set up a "recycle bin" for the network share using VFS for Samba (built in on the CentOS version, may be on others as well). I created a share called "Trash" and then created a symlink to it into the user's network share as a hidden file (.deleted). VFS takes the file when a user deletes it and moves it to the .deleted folder (which is symlinked to the recycle folder). I then access the "Trash" share as another mapped drive and can manually delete files, thus stopping the accidential deleteion of files by users. Here's my shares setup in my smb.conf:

[Home Share]
comment = Home Share
path = /rd0/home-share
writeable = yes
guest ok = yes
read only = no
public = yes
hide dot files = yes
follow symlinks = no
vfs object = recycle
recycle:repository = .deleted
recycle:keeptree = Yes
recycle:touch = Yes
recycle:versions = Yes
recycle:maxsixe = 0
recycle:exclude = *.tmp
recycle:exclude_dir = /tmp

[Network Trash]
comment = Network Trashcan
path = /rd0/recycle
valid users = trash
writeable = yes
public = no

Now my next question is how do I change the timestamp on the files when they get moved into the "Trash" folder? I'd like to whip up a cron script to delete files after 5 days or so to keep the system sane.
Thanks.
 
Old 03-29-2007, 08:05 AM   #4
jakev383
QmailToaster Developer
 
Registered: Dec 2005
Location: Burlington, NC
Distribution: CentOS, Voyage, Debian, Fedora
Posts: 220

Original Poster
Rep: Reputation: 31
Didn't realize that the recycle:touch option was already modifying the mod time on the files - it's not visible unless you use "ls -lu" to see the mod date. That will make a cleaning script easier.
Hope this helps someone else out!
 
  


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
I want to setup and manage a linux server, any book suggestions? blackimpallass Linux - General 3 07-26-2006 10:34 AM
Setup ssh and vpn router from home: suggestions/help GATTACA Linux - Networking 2 09-13-2005 08:40 AM
Request for suggestions on user setup pembo13 Linux - Networking 2 12-15-2003 11:11 PM
HUGE Drive setup: Partition scheme suggestions... tarballed Linux - Networking 2 07-02-2003 04:43 PM
Suggestions on NIC setup Zvezda Linux - Networking 3 02-22-2002 04:44 AM

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

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