The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM


UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Test automation tool for UNIX ?? unmanju Shell Programming and Scripting 4 10-11-2008 09:51 AM
Script runs fine on UNIX Server...Not through MSK Tool kit on Windows Server madhunk UNIX for Dummies Questions & Answers 5 01-31-2008 10:30 AM
Free monitoring tool on Unix salhoub UNIX for Advanced & Expert Users 1 07-05-2005 04:37 AM
Tool top daemon SUN Solaris 2 08-04-2004 07:36 PM
Archival Tool for UNIX sanjeev0915 UNIX for Dummies Questions & Answers 7 10-23-2001 01:07 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #8  
Old 12-18-2007
Registered User
 

Join Date: Jan 2007
Posts: 2,965
Some operating systems support Access Control Lists but they are really glorified permissions, it won't solve your requirement.
Reply With Quote
Forum Sponsor
  #9  
Old 12-18-2007
Yogesh Sawant's Avatar
Part Time Moderator and Full Time Dad
 

Join Date: Sep 2006
Location: Rossem, Tazenda
Posts: 798
in my opinion, you need to tell all people not to edit those files directly, and provide them access to your tools using which they can do the required editing (if your tools are good enough, then they may quit their old habits and start using the tools)

if you are going ahead with fcntl, this is a good place to visit
Reply With Quote
  #10  
Old 12-23-2007
Registered User
 

Join Date: Dec 2007
Location: Virginia, USA.
Posts: 250
Comon workaround

Since mandatory file locking in *nix is somewhat, well, borked , you could use the common kludge of an independent lockfile for exclusive access per file. The trick there is
making bulletproof the removal of the same based on client behavior, implementing a timed wait, etc..Not impossible, but challenging.
Reply With Quote
  #11  
Old 12-23-2007
Read Only
 

Join Date: Nov 2007
Posts: 165
Could some lateral thinking work?

Perhaps you could save the file encrypted, so that editing it has to be a 2-stage process.
Of course, your would have to decrypt it for use too.

Alternatively, you could secure the file so it could not be edited, and then use sudo to access it.
If you did a wrapper on the front, then that could take care of locking.

Another option would be to use NFS to share the file, and then mount it back with extra controls.

Or perhaps you could make the control files binary, so that they need a front-end of your choice to edit.

Or maybe a version control system (eg. RCS) could be used to check in and out the file.

But at the end of the day, essentially you've got a security situation - directory and file permissions should be set so that only designated and authorised persons have access to (view/edit) files, and anything that circumvents this is badly designed and/or implemented.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Tags
fcntl, file locking

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 09:05 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0