ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Prevent delete of IFS directory

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Prevent delete of IFS directory

    Would like to prevent the deletion of directories in the IFS. It would be ok for a user to delete an individual file within the directory, just want to make sure the directory itself does not get deleted. Any suggestions? Thanks.

  • #2
    "Directories in the IFS" is extremely broad. This can relate to the library file system, document library services, optical file systems etc etc etc. Basically everything.
    I can only suggest looking at the object authority for these directories.

    Comment


    • #3
      Should've been more specific. I'm referring to the root file system, not qsys.lib, not QDLS, nor a user-defined file system.

      Certain directories under /root are shared. For example, /home/mydir has multiple directories under it, such as, /home/mydir/2017 and /home/mydir/2018 and these directories have more subdirectories. I want to prevent a user from deleting the directory /home/mydir/2017 as that will "kill" a lot of subdirectories and files.

      Will removing object existence authority from *PUBLIC or specific users prevent the deletion of the directory?

      Comment


      • #4
        Here is a link to the RMVDIR command which explains the authority restrictions: https://www.ibm.com/support/knowledg.../cl/rmvdir.htm

        Comment


        • #5
          There's also *ALLOBJ special authority to consider as part of a user profile or group/supplements group profiles. I would hope that *ALLOBJ would be highly restricted but is another consideration on top of the objects authorities.

          Comment


          • #6
            Regarding *ALLOBJ, I'm the only one with "god-like" powers besides a few Q* profiles. My suspicion is that the directory was deleted, accidentally, by a windows user as the IFS directory is set as a share on the PCs. I've turned on *DELETE auditing (I know, the horse has left the barn) but that will only tell me "whodunnit". Also, the process creates new sub-directories when a new month starts, so I'll have to change how that directory gets ownership.
            I will test the RMVDIR command after I change the ownership/rights to the parent directory to see what happens.
            Thanks for all the suggestions.

            Comment

            Working...
            X