![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert. |
|
|
||||
| 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 |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#8
|
|||
|
|||
|
Some operating systems support Access Control Lists but they are really glorified permissions, it won't solve your requirement.
|
| Forum Sponsor | ||
|
|
|
#9
|
||||
|
||||
|
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 |
|
#10
|
|||
|
|||
|
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. |
|
#11
|
|||
|
|||
|
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. |
|||
| Google The UNIX and Linux Forums |
| Tags |
| fcntl, file locking |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|