Monitoring file permission changes [ solved, kind of]

I have a configuration file on my server for a program that runs on Windows desktops.  For some reason, the permissions on that file keep getting changed, and it isn't being done manually by anyone.  I'm not sure why this is happening, and it seems to happen at random intervals.
Is there a way to monitor when the permissions on this file get changed?
Last edited by timm (2009-04-03 19:47:00)

http://fileschanged.sourceforge.net/
fileschanged is a GNU/Linux command-line utility that reports when files have been altered.
You'll need either fam or gamin installed to use this. I was gonna write a similar program myself. It'll most likely be better than having an infinitely look in a script or having crontab calling a script every second.

Similar Messages

  • Monitoring File Permission Changes with dTrace?

    Hi,
    We have a file whose permissions are getting changed occasionally, and we're trying to determine which process is changing them.
    Can someone describe how to do this with dTrace?
    Thanks in advance!
    -Rocky
    Edited by: umuc-rocky on Mar 31, 2009 10:50 AM

    Try this clause for starters:
    syscall::chmod:entry
    printf("Calling program: %s\n", execname);
    printf("Target file: %s\n", fds[arg0].fi_name);
    }

  • /dev/null file permission changes frequently

    Hi,
    We are experiencing file permission change issue frequently for the
    following files:
    root@domain5 # ls -l /devices/pseudo/mm@0:null
    crw-rw-rw- 1 root sys 13, 2 Apr 22 2009
    /devices/pseudo/mm@0:null
    root@domain5 # ls -l /dev/null
    crw-rw-rw- 1 root sys 13, 2 Oct 25 07:01 /dev/null
    By default, above is the file permission settings. If the file permission
    changes, it will look like as below:
    root@domain5 # ls -l /devices/pseudo/mm@0:null
    cr--r--r-- 1 root sys 13, 2 Apr 22 2009
    /devices/pseudo/mm@0:null
    root@domain5 # ls -l /dev/null
    cr--r--r-- 1 root sys 13, 2 Oct 25 07:01 /dev/null
    Due to this file permission change the script which uses this file loose
    the write permission and the script fails. To fix this issue, we will be
    manually changing the permission. Can you please help me to know the cause for
    this file permission change.
    Thanks,
    Ram.

    You need to correlate any changes on the system to when you have the problem, or see the date on /dev/null change. Software packages can change this, applications can change this, sometimes even patch installs.
    Even certain administrative practices.
    Here's one example, where touching a vendor software-created printer config with native Solaris admintool would change /dev/null permissions
    http://www.rootunix.org/SOLARIS/printFAQ.txt
    10) ONLY ROOT CAN SEND PRINT JOBS:
    This problem is caused by network spooling software that for a
    network printer that uses /dev/null for the printer device. The
    software monitors the queue and spools the print requests over the
    network to the printer. If the printer setup is modified in any
    way with Admintool, the printer device (/dev/null) permissions will
    change to 600 owner lp.

  • Listen to File Permission Change

    I want to listen to any change in permissions (specifically whether a file is read only or not) of certain text files from within my program. How do I do it?
    Basically, I want to get notifications when an relevant file's read-only attribute toggles. This is to implement a feature where editing of a document is disabled if the document is read-only. The editor should detect the change in this property and allow editing when appropriate. This feature is implemented in several Java IDEs like Eclipse, IntelliJ etc.
    Please provide sample code.
    Thanks,
    Krishna

    This isn't directly possible in a pure Java implementation.
    However, you can implement it quite easily yourself......
    Have a Timer task (or similar) that you schedule to run at whatever frequency is suitable for your use, and have it inspect the files that you have registered interest in (check out the File 'canRead' and 'canWrite' methods).
    Its then quite easy to set up a notification based system:
    * Something capable of monitoring files for changes to their permissions and of notifying
    * registered listeners
    public interface FilePermissionsMonitor {
      void addPermissionsChangeListener(PermissionsChangeListener p, File target);
      void removePermissionsChangeListener(PermissionsChangeListener p);
      void removeListenersFor(File target);
    public interace PermissionsChangeListener {
      // could make this more swanky by introducing a PermissionsChangeEvent 'describing' the change.
      // e.g, it could provide the 'last known' previous permissions in addition to the target file.
      // For brevity, we'll just provide the target File here....
      void permissionsChanged(File target);
    * A FilePermissionsMonitor which uses a timer to periodically check for changes in permissions
    public class PeriodicMonitor implements FilePermissionsMonitor  {
        Implement this as described at the top of this post. I.e, schedule a TimerTask periodically
        which checks the permissions of all Files for which listeners are registered (you'll need to keep hold
        of the 'last known' permissions for each file you are interested in. Notify the relevant listeners when
        you find a change in permissions
    }

  • Can you please advice on RAW device file permission change to crw-r-----

    Currently we have Oracle9i (9.2.0.5) RAC on IBM AIX 5.2 system with 2 node cluster.
    We use the RAW device for Oracle data file default file permission for raw device is crw-rw---- can we change to crw-r-----(remove write permission from group).
    Can you please advice.
    Thanks & Regards

    Hi,
    What is your intention behind this? If protection, there can ve other ways possible.
    Regards,
    Ankit

  • Can't find mp4 file after changing media kind setting to podcast

    I recently imported some home videos into iTunes.  The default "media kind" is movies so I changed to podcast b/c I didn't want to mix home videos with movies when surfing through lists on my Apple TV.  After chaning the media kind setting now I can't find the file in iTunes.  Any idea on how I can update the media kind info so I can see the file again in iTunes on my Windows PC?

    maybe the features of the usb port is controlled by the routers setup page most routers have some ip address you type into a browser and login to the router to set them up try that
    because some routers have usb for external hd some for printers some only for firmware updates (like the Apple TV (which of cause are not routers but have usb connector for the sole purpose of upgrading a crashed firmware))

  • Kernel Panic from system file permission changes

    A friend and i were trying to share some image files with each-other so we firewire connected our two macs... (both mac book pros mine a intel core on snow-leopard hers the latest is7 operating system -prob Lion) when the corresponding computer did not appear on our desktops I entered "sharing" console on my system prefs and attempted to allow her computer to see and read/write mine... I got a pop up prompt asking if i wished to share all my internal files and I said "yes"  Shortly thereafter a repeat prompt kept popping up on my computer saying something like ~"can't share system files" I pressed "ok" each time it appeared and after a few pop ups it all seemed ok...
    By now as a backup attempt to share my files i had plugged in my external (open permissions) hard-drive which at this point suddenly told me i am not allowed to read or write on it... I ejected it and since the whole system was still spinning and wanting to share permissions I force-quit the finder and selected "shut down" my system to start fresh but when attempting to restart finder I first a few moments later I got that - multilingual kernel panic prompt
    it won't start up - it won't boot from disc (at start i hold down option and insert operating disc) it wont start up (I've depressed shift after start and arrived at a spinning wheel that never ends... i'm also out of my warranty and hoping to solve this without paying for a new mac

    Unfortunately, the log files are full of scary-sounding messages. Unless you have some specific problem other than the logs, there is usually no need to worry about it. Sometimes, a problem may be reflected in the logs, but you can't start with the logs. You'll never finish.

  • [request] peek: monitor files for changes

    http://www.matusiak.eu/numerodix/blog/i … ix+blog%29

    Hmm.. it would never occur to me to package something like this. I just DLed it straight to my ~/bin, chmod +x, and it runs fine.
    I suppose a package would be better.. but it's just a script...

  • Desktop permission changes

    I would like some help regarding permissions. In our office, each employee uses their own iMac and we are on a small Ethernet network. There are four iMacs and each is running Snow Leopard. I have configured it so that each iMac is sharing its desktop. In our office workflow, my co-workers and I intuitively share files by dropping them onto each other's desktops.No need to hunt in our drop boxes which are buried a few levels.
    ISSUE: When I put a file onto a co-worker's desktop, the file permission changes to 'nobody'. If they continue to work on the file and try to save it, they can't. So in order to continue working on a file they have to 'Get Info' first and change the permissions to 'Read & Write' for themselves. However, if I ask my co-worker to get the file from my desktop, the file's permissions are fine and they can open, modified, and save the file without a problem.
    QUESTION: Is there a way to configure our settings so that files can be put onto the desktop's of other co-workers without having to mess with the permissions each time? Why does it work one way (get) but not the other way (put)?

    You don't have permissions to modify an item you do not own.  When you copy a file to another account, it keeps your ownership and permissions, which means only you can write to it.  When another user copies your files, they own the copies, which lets them write to it (you might not have noticed, but you won't have permission to write to their copies, either).
    You can use ACL (Access Control List) entries to give additional permissions - each user's Drop Box folder is also set up this way.

  • Workflow to change file permission in SharePoint Online Document Library

    1.What are my options with SPD 2013 If I want to change a documents file permission in a workflow?
    2.Where does SPO host 2013 Workfows?
    3.If connecting to SPO Can I use Worklow Manager 1.0?
    4.Will I need to host my Workflow Manager workflows on server or Azure if running against o365/SPO?
    5.If I wish to create SPO 2013 workflows with Visual Studio 2012, what do I need and will I be limited to actions I see in SPD 2013?
    ============================
    Thank You
    cyberpine.com

    You can host this workflow as a SharePoint App in SharePoint Online or use SharePoint Designer to create this workflow as long as you use the app step. Managing the permissions can be done with a REST call.  The initiator of the workflow must have
    been granted the right to "Manage Permissions" and the app must have full control of the Site Collection.   We have done so for several of our clients.   I know you asked this question some time ago, but I thought the info might still be helpful.

  • Whenever I close down Photoshop CS5 I get the message: "Could not save Preferences because the file is locked or you do not have the necessary access privileges. Use the get info command in Finder to unlock the file or change permission on the file or enc

    Whenever I close down Photoshop CS5 I get the message: "Could not save Preferences because the file is locked or you do not have the necessary access privileges. Use the get info command in Finder to unlock the file or change permission on the file or enclosing folders." What on earth does it mean? How can I stop this message from appearing?

    See here:
    I cannot save recent images.

  • Changing oracle file permission with ftp / sql

    Hi, i have a question:
    I've configure webdav to browse my /i folder.
    I can use as well filezilla, connecting with hostname / uname: system / pass / myoraclesystem pass.
    Is there a way to change file permission attributes with ftp?
    Thank you

    Hi,
    Check out ORDSYS.ORDImage type from Oracle Intermedia, and especially its "process" method.
    It possesses various commands to change image properties.
    HTH.

  • How to use FilePermission class to change the file permission in Linux

    Hi all,
    I'm running in a issue related to changing the file permission under Linux environment. I'm using Suse 10.0 Linux and run jdk 1.5 java runtime.
    I want to create a file during execution time and change the permission of the same. I use File.createNewFile() API to create file. By default it does not have all the 3 permission (read,write,execute) for all the user ( user,owner,group). Through program I have to change the file permission ( equal to execute ,chmod 777 filename).I donot want to use runtime.exec() with chmod as the argument , since it creates a process to change the permission which may impact the performance. I want to try FilePermission class , by giving filename and permission as the argument. But it is not changing the permission . Could any one faced this problem ?
    If any body guides me, how to change the permission of the file under Linux using FilePermission class , it would be helpful.
    Thanks,
    Sankar

    How do I set the Umask prior to starting the program
    ? Could pls explain in steps.I don't think umask can help you. The mode mask prevents permission bits from being set when a file is created, but does not force any bits to be set. So if execute permission is not set explicitly when a file is created, umask will do nothing about it.
    But if you want more information about umask, see the man page for your shell script (sh, csh, etc.) or "man 2 umask".

  • EXC_BAD_ACCESS (SIGBUS) with .pkg file after permission change on my HDD

    Hi everybody excuse my english, i'm form french.
    I'm here because I can not install my mobile modem 3G driver (.pkg). When I try to install I have this message *Setup can not open the package. It is likely that the executable file for applications installation has no property rights and / or authorizations.* and after crash and give me exception error *KERNPROTECTIONFAILURE at 0x0000000000000027*.
    Thanks for your help

    Nobody can help me?? I think my installer.app is corrupted due to permission change and I tried all disk authorization repair but nothing to do. There are no apple responsable support in this forum??
    thanks

  • Changing Folder & File Permission via Java Program

    Please help me with some Java Code on how to change Folder & File Permission on CM

    Hi Christopher,
    Perhaps this
    Repository Service auto change resource permissions
    thread might help you.
    Regards,
    Patrick.

Maybe you are looking for