Domain directories: File management
File management rules enable you to automatically remove or archive files from the file server. You can configure file management rules at the server and domain level.
- If they are specified at the server level, the file management rules are accessible to all users of the file server.
- If they are specified at the domain level, they are only accessible to users belonging to that domain.
Depending on the file system, Serv-U File Server uses the creation or change date of files to determine the expiration date. In Windows, the creation date of the file is used to determine when a file expires. In Linux, the change date is used to determine the expiration date. The change date is updated whenever the metadata or index node (inode) of the file is modified. If the contents or attributes (such as the permissions) of the file are modified, the change date is also updated.
The change date is not modified if the file is read from.
The file management rules apply recursively to all files within the folder for which they are configured, and not only to those that have been uploaded through Serv-U File Server. This way you can manage files that are transferred by clients, or that are copied to the folder outside of Serv-U File Server.
The folder structure is not affected by the file management rules. When expired files are deleted or moved, the folders themselves remain intact.
The file management rules run hourly in the background. For this reason, there can be an hour delay before Serv-U File Server deletes or moves an expired file.
If you have the MFT edition of Serv-U File Server, you can monitor the status of the file management rules by configuring File Management Rule Success and File Management Rule Error events under Server Details or Domain Details > Events. The file management rules continue to run even if deleting or moving a single file fails. For more information, see Events.
Define a new file management rule
- Navigate to Directories > File Management, and click Add.
- Enter the path to the file or folder in the Directory Path field, or click Browse to navigate to the file or folder.
- Select the action you want to perform on the file:
- If you want to delete the file after it expires, select Delete file(s) after specified time.
- If you want to move the file after it expires, select Move file(s) after specified time, and then in the Destination Directory Path field, specify the folder where you want to move the file.
- Specify the number of days after the file creation date when the action should be executed.
- Click Save.
Serv-U File Server regularly checks each file in the directory for its age, and performs the specified action on the files that meet the age criteria specified.