Package org.glassfish.security.common
Class FileProtectionUtility
- java.lang.Object
-
- org.glassfish.security.common.FileProtectionUtility
-
public class FileProtectionUtility extends Object
Provides common functionality for protecting files.- Author:
- Phillip Ross
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
chmod0600(File file)
Set permissions on the specified file equivalent to file mode 0600.
-
-
-
Method Detail
-
chmod0600
public static void chmod0600(File file) throws IOException
Set permissions on the specified file equivalent to file mode 0600. NOTE: This method will only set permissions on files that exist on filesystems which support POSIX file permissions. Manipulation of permissions is silently skipped for filesystems that do not support POSIX file permissions (such as Windows NTFS).- Parameters:
file
- The file to set permissions on- Throws:
IOException
- if an I/O error occurs
-
-