ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    File Deletion after x amount of time CentOS 7

    Water Closet
    8
    34
    1.6k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • wirestyle22W
      wirestyle22 @scottalanmiller
      last edited by

      @scottalanmiller said in How to Make a File Self Delete or Time Bomb:

      @wirestyle22 said in How to Make a File Self Delete or Time Bomb:

      Our users have no idea how to maintain a file server or use things for their intended purpose so I want to establish a policy immediately when this thing goes live so if their files are deleted it's their own problem

      You could, instead. secretly archive the files and store them someplace offline so that they THINK that they deleted them.

      Nah
      http://i.imgur.com/eaQvGdK.gif

      scottalanmillerS 1 Reply Last reply Reply Quote 0
      • scottalanmillerS
        scottalanmiller @wirestyle22
        last edited by

        @wirestyle22 said in How to Make a File Self Delete or Time Bomb:

        @scottalanmiller said in How to Make a File Self Delete or Time Bomb:

        @wirestyle22 said in How to Make a File Self Delete or Time Bomb:

        Our users have no idea how to maintain a file server or use things for their intended purpose so I want to establish a policy immediately when this thing goes live so if their files are deleted it's their own problem

        You could, instead. secretly archive the files and store them someplace offline so that they THINK that they deleted them.

        Nah
        http://i.imgur.com/eaQvGdK.gif

        Just be aware, if YOU delete files and something important is lost and you aren't 100% clear that there is a policy for this protecting you from management telling YOU that you can delete files, you could be on the hook legally. I would never do this unless told to, in writing, explicitly by management.

        1 Reply Last reply Reply Quote 3
        • scottalanmillerS
          scottalanmiller
          last edited by

          Even if there is a policy that the users are supposed to clean up files, unless there is also a policy that says that IT is tasked to enforce this through forced deletion, I would stay away from this completely. There is a huge different between "users are supposed to clean things up" and "IT has decided to start deleting things." Never take enforcement into your own hands.

          DustinB3403D 1 Reply Last reply Reply Quote 3
          • DashrenderD
            Dashrender @wirestyle22
            last edited by

            @wirestyle22 said in How to Make a File Self Delete or Time Bomb:

            Our users have no idea how to maintain a file server or use things for their intended purpose so I want to establish a policy immediately when this thing goes live so if their files are deleted it's their own problem

            Good luck getting this by management. My boss would never allow something that auto deletes something after not being touched for some period of time.

            Perhaps she would allow some type of auto archive that the user would then have to contact IT to get it back, but auto delete - never.

            GreyG scottalanmillerS 2 Replies Last reply Reply Quote 1
            • GreyG
              Grey @Dashrender
              last edited by

              @Dashrender said in How to Make a File Self Delete or Time Bomb:

              @wirestyle22 said in How to Make a File Self Delete or Time Bomb:

              Our users have no idea how to maintain a file server or use things for their intended purpose so I want to establish a policy immediately when this thing goes live so if their files are deleted it's their own problem

              Good luck getting this by management. My boss would never allow something that auto deletes something after not being touched for some period of time.

              Perhaps she would allow some type of auto archive that the user would then have to contact IT to get it back, but auto delete - never.

              We have docs that share data and that folder must be auto-cleaned. HIPAA.

              scottalanmillerS 1 Reply Last reply Reply Quote 0
              • scottalanmillerS
                scottalanmiller @Dashrender
                last edited by

                @Dashrender said in How to Make a File Self Delete or Time Bomb:

                @wirestyle22 said in How to Make a File Self Delete or Time Bomb:

                Our users have no idea how to maintain a file server or use things for their intended purpose so I want to establish a policy immediately when this thing goes live so if their files are deleted it's their own problem

                Good luck getting this by management. My boss would never allow something that auto deletes something after not being touched for some period of time.

                Perhaps she would allow some type of auto archive that the user would then have to contact IT to get it back, but auto delete - never.

                And if she wanted it, she should be telling you to do it, not you asking if you can do it. No reason for IT to care or promote this outside of letting management know that it is an option or whatever.

                wirestyle22W 1 Reply Last reply Reply Quote 0
                • scottalanmillerS
                  scottalanmiller @Grey
                  last edited by

                  @Grey said in How to Make a File Self Delete or Time Bomb:

                  @Dashrender said in How to Make a File Self Delete or Time Bomb:

                  @wirestyle22 said in How to Make a File Self Delete or Time Bomb:

                  Our users have no idea how to maintain a file server or use things for their intended purpose so I want to establish a policy immediately when this thing goes live so if their files are deleted it's their own problem

                  Good luck getting this by management. My boss would never allow something that auto deletes something after not being touched for some period of time.

                  Perhaps she would allow some type of auto archive that the user would then have to contact IT to get it back, but auto delete - never.

                  We have docs that share data and that folder must be auto-cleaned. HIPAA.

                  And in a case like that, management and management alone would dictate that and make it something that IT has to do. IT would never be the banner carrier for a retention policy.

                  1 Reply Last reply Reply Quote 0
                  • wirestyle22W
                    wirestyle22 @scottalanmiller
                    last edited by wirestyle22

                    @scottalanmiller said in How to Make a File Self Delete or Time Bomb:

                    @Dashrender said in How to Make a File Self Delete or Time Bomb:

                    @wirestyle22 said in How to Make a File Self Delete or Time Bomb:

                    Our users have no idea how to maintain a file server or use things for their intended purpose so I want to establish a policy immediately when this thing goes live so if their files are deleted it's their own problem

                    Good luck getting this by management. My boss would never allow something that auto deletes something after not being touched for some period of time.

                    Perhaps she would allow some type of auto archive that the user would then have to contact IT to get it back, but auto delete - never.

                    And if she wanted it, she should be telling you to do it, not you asking if you can do it. No reason for IT to care or promote this outside of letting management know that it is an option or whatever.

                    It was requested by upper management of the city. I know there are going to be a lot of tears and I'm here to say your tears taste so good users. So good.

                    DashrenderD scottalanmillerS 2 Replies Last reply Reply Quote 0
                    • DashrenderD
                      Dashrender @wirestyle22
                      last edited by Dashrender

                      @wirestyle22 said in File Deletion after x amount of time CentOS 7:

                      @scottalanmiller said in How to Make a File Self Delete or Time Bomb:

                      @Dashrender said in How to Make a File Self Delete or Time Bomb:

                      @wirestyle22 said in How to Make a File Self Delete or Time Bomb:

                      Our users have no idea how to maintain a file server or use things for their intended purpose so I want to establish a policy immediately when this thing goes live so if their files are deleted it's their own problem

                      Good luck getting this by management. My boss would never allow something that auto deletes something after not being touched for some period of time.

                      Perhaps she would allow some type of auto archive that the user would then have to contact IT to get it back, but auto delete - never.

                      And if she wanted it, she should be telling you to do it, not you asking if you can do it. No reason for IT to care or promote this outside of letting management know that it is an option or whatever.

                      It was requested by upper management of the city. I know there are going to be a lot of tears and I'm here to say your tears taste so good users. So good.

                      Are up Cartman now? 😛

                      Tears of unfathomable sorrow -Cartman to Scott Tenorman.

                      wirestyle22W 1 Reply Last reply Reply Quote 1
                      • wirestyle22W
                        wirestyle22 @Dashrender
                        last edited by

                        @Dashrender said in File Deletion after x amount of time CentOS 7:

                        @wirestyle22 said in File Deletion after x amount of time CentOS 7:

                        @scottalanmiller said in How to Make a File Self Delete or Time Bomb:

                        @Dashrender said in How to Make a File Self Delete or Time Bomb:

                        @wirestyle22 said in How to Make a File Self Delete or Time Bomb:

                        Our users have no idea how to maintain a file server or use things for their intended purpose so I want to establish a policy immediately when this thing goes live so if their files are deleted it's their own problem

                        Good luck getting this by management. My boss would never allow something that auto deletes something after not being touched for some period of time.

                        Perhaps she would allow some type of auto archive that the user would then have to contact IT to get it back, but auto delete - never.

                        And if she wanted it, she should be telling you to do it, not you asking if you can do it. No reason for IT to care or promote this outside of letting management know that it is an option or whatever.

                        It was requested by upper management of the city. I know there are going to be a lot of tears and I'm here to say your tears taste so good users. So good.

                        Are up Cartman now? 😛

                        We're all Cartman. This is the internet

                        1 Reply Last reply Reply Quote 0
                        • thwrT
                          thwr @scottalanmiller
                          last edited by

                          @scottalanmiller said in File Deletion after x amount of time CentOS 7:

                          @wirestyle22 said in How to Make a File Self Delete or Time Bomb:

                          @scottalanmiller CentOS 7

                          Would not have guessed that at all! Normally with no other info we assume Windows. CentOS makes it easy.

                          Same for Windows: Scheduled task, FileSystemWatcher, NTFS filter - OK, I must admit, that's a bit harder to implement. But a scheduled task will do just fine in Windows.

                          For anything *nix: cron

                          1 Reply Last reply Reply Quote 0
                          • JaredBuschJ
                            JaredBusch
                            last edited by

                            This is one I have live on a system.

                            [root@tophatftp ~]# crontab -l
                            #Delete all files older than 30 days. Check daily begining at 06:00
                            0 6 * * * find /home/toptech/Hartford* -mtime +30 -type f -delete
                            1 6 * * * find /home/toptech/NorrisCity* -mtime +30 -type f -delete
                            2 6 * * * find /home/toptech/NorthLittleRock* -mtime +30 -type f -delete
                            3 6 * * * find /home/toptech/Seymour* -mtime +30 -type f -delete
                            4 6 * * * find /home/toptech/TopHat* -mtime +30 -type f -delete
                            [root@tophatftp ~]#
                            
                            wirestyle22W 1 Reply Last reply Reply Quote 4
                            • scottalanmillerS
                              scottalanmiller @wirestyle22
                              last edited by

                              @wirestyle22 said in File Deletion after x amount of time CentOS 7:

                              @scottalanmiller said in How to Make a File Self Delete or Time Bomb:

                              @Dashrender said in How to Make a File Self Delete or Time Bomb:

                              @wirestyle22 said in How to Make a File Self Delete or Time Bomb:

                              Our users have no idea how to maintain a file server or use things for their intended purpose so I want to establish a policy immediately when this thing goes live so if their files are deleted it's their own problem

                              Good luck getting this by management. My boss would never allow something that auto deletes something after not being touched for some period of time.

                              Perhaps she would allow some type of auto archive that the user would then have to contact IT to get it back, but auto delete - never.

                              And if she wanted it, she should be telling you to do it, not you asking if you can do it. No reason for IT to care or promote this outside of letting management know that it is an option or whatever.

                              It was requested by upper management of the city. I know there are going to be a lot of tears and I'm here to say your tears taste so good users. So good.

                              I'd make sure that you have it in writing 😉

                              1 Reply Last reply Reply Quote 2
                              • wirestyle22W
                                wirestyle22 @JaredBusch
                                last edited by

                                @JaredBusch This is great. Thanks!

                                1 Reply Last reply Reply Quote 0
                                • stacksofplatesS
                                  stacksofplates
                                  last edited by

                                  SystemD has a utility called systemd-tmpfiles that has a 'clean' utility that will delete files/directories after a certain time period.

                                  1 Reply Last reply Reply Quote 0
                                  • DustinB3403D
                                    DustinB3403 @scottalanmiller
                                    last edited by

                                    @scottalanmiller said in File Deletion after x amount of time CentOS 7:

                                    Even if there is a policy that the users are supposed to clean up files, unless there is also a policy that says that IT is tasked to enforce this through forced deletion, I would stay away from this completely. There is a huge different between "users are supposed to clean things up" and "IT has decided to start deleting things." Never take enforcement into your own hands.

                                    I agree, same thing as if your reporting has told you a user is watching youtube all day, you report it up and have management deal with it. You don't go adjusting your content filter.

                                    1 Reply Last reply Reply Quote 0
                                    • 1
                                    • 2
                                    • 2 / 2
                                    • First post
                                      Last post