LinuxQuestions.org
Review your favorite Linux distribution.
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 11-17-2006, 03:47 AM   #1
ManRSA
LQ Newbie
 
Registered: Oct 2005
Distribution: Suse Prof 9.3
Posts: 13

Rep: Reputation: 0
How to Deny Users to Delete, but Allow Write/Read and Exec


Hi

We're running Samba on a Suse Prof 9.3 server. We have a voicelog system that saves all calls as mp3 files. The users are all using Windows machines with the Samba drive on the server mapped. (had to do this to get the software to save the files on the server and this is 3rd party software and not our own). The software that records the calls allows you to edit the information about the call, for example "Called Sam for a quotation on aircons". Now, the users are allowed to write to the mapped drive, read it (for playback) and edit the info about calls. And at this stage they can delete calls, either via the software or via Windows explorer on the mapped drive.

I would like to know is there a way that I can prevent them from deleting the files, but still be able to edit and read them?
 
Old 11-18-2006, 06:12 AM   #2
rjwilmsi
Member
 
Registered: Mar 2005
Location: UK
Distribution: opensuse 12.2 x86_64
Posts: 563

Rep: Reputation: 38
I don't think so. Write access would imply the ability to delete (what's the real difference between removing all the text in a text file or deleting the file?). You could set up read-only and execute rights though.
 
Old 11-18-2006, 06:43 AM   #3
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
As far as I know deleting or editing a file involves unlink and write syscalls. If you're allowed write then you can write whatever. Server filesystem extended attributes are honoured, but useless for files yet to be created. Easiest way I can think of would be to separate writes and edits by chowning the file to a group with read but w/o write rights and make users add a text file with comments. Then you can write in the comments using "mp3info" as another user.
 
Old 11-21-2006, 02:02 AM   #4
ManRSA
LQ Newbie
 
Registered: Oct 2005
Distribution: Suse Prof 9.3
Posts: 13

Original Poster
Rep: Reputation: 0
Thing is, the files are written as mp3 files, and those of you familiar with winamp or some other media player will now that you can add attributes like artist and song title and that kind of stuff to it, but most of the software don't allow you do alter the audio. The same with the 3rd party software we are using, you can alter the attributes of the files, but not the audio itself. So it is not like a text file where you can delete all the text, which will not be different from deleting the whole file.

As for creating different groups or users, the 3rd party software has it's own interface allowing edits to the files and allowing delete. It would not be possible for me to distinguish between the user editing and the user deleting. I think the easiest would be to contact the 3rd party software vendors and ask them to limit the rights.

Another solution would be to get some kind of backup program/code to backup all the files on the server to another directory, with changes and new files being written to the destination, but without deleting files that is in the destination folder, but not in the source folder. SyncBack is a freeware Windows app that allows you to do this, is there a linux app like this? Or is there code that I can use to do this? Like copy or something?
 
  


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
Deny SSH-users to read filesystem, except their homedirs? Waerner Linux - Newbie 2 02-12-2006 07:44 AM
Help required with samba... deny delete but allow write? NuLLiFiEd Linux - Networking 5 07-04-2005 04:53 PM
Allow two users write access, but not delete jimieee Linux - General 4 03-29-2005 08:37 AM
vsftpd: allow users to write and delete files me3 Linux - Software 4 03-04-2005 07:22 PM
How to Read, Write, Execute but not Delete r042wal Linux - Software 6 06-07-2003 11:05 AM

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

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