mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-03 00:31:50 +00:00
Update file permissions (#2499)
## Issue Addressed Resolves #2438 Resolves #2437 ## Proposed Changes Changes the permissions for validator client http server api token file and secret key to 600 from 644. Also changes the permission for logfiles generated using the `--logfile` cli option to 600. Logs the path to the api token instead of the actual api token. Updates docs to reflect the change.
This commit is contained in:
@@ -52,7 +52,7 @@ pub enum Error {
|
||||
UnableToRemoveACLEntry(String),
|
||||
}
|
||||
|
||||
/// Creates a file with `600 (-rw-------)` permissions.
|
||||
/// Creates a file with `600 (-rw-------)` permissions and writes the specified bytes to file.
|
||||
pub fn create_with_600_perms<P: AsRef<Path>>(path: P, bytes: &[u8]) -> Result<(), Error> {
|
||||
let path = path.as_ref();
|
||||
let mut file = File::create(&path).map_err(Error::UnableToCreateFile)?;
|
||||
|
||||
Reference in New Issue
Block a user