File Deletion after x amount of time CentOS 7
-
@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
Here's how to do the same thing in powershell: http://www.networknet.nl/apps/wp/published/powershell-delete-files-older-than-x-days
-
@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.
-
@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.
I see you're a graduate from the Hillary Clinton School of Technology.
-
@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.
-
@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.
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.
-
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.
-
@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.
-
@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.
-
@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.
-
@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.
-
@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.
-
@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.
-
@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
-
@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
-
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 ~]#
-
@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
-
@JaredBusch This is great. Thanks!
-
SystemD has a utility called systemd-tmpfiles that has a 'clean' utility that will delete files/directories after a certain time period.
-
@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.