{"record":{"id":"25ea073a520aba1b","repo":"uutils/coreutils","slug":"getting-meta-data","errorCode":null,"errorMessage":"Getting meta data","messagePattern":"Getting meta data","errorType":"exception","errorClass":"uucore::error::Error","httpStatus":null,"severity":"error","filePath":"src/uu/chcon/src/chcon.rs","lineNumber":536,"sourceCode":"            Error::from_io1(\n                translate!(\"chcon-op-file-name-validation\"),\n                &file_full_name,\n                err,\n            )\n        })?;\n\n        let err = |s, k: io::ErrorKind| Error::from_io1(s, &file_full_name, k.into());\n\n        let fts_err = |s| {\n            let r = io::Error::from_raw_os_error(entry.errno());\n            Err(Error::from_io1(s, &file_full_name, r))\n        };\n\n        // SAFETY: If `entry.fts_statp` is not null, then it is assumed to be valid.\n        let file_dev_ino: DeviceAndINode = if let Some(st) = entry.stat() {\n            st.try_into()?\n        } else {\n            return Err(err(\n                translate!(\"chcon-op-getting-meta-data\"),\n                io::ErrorKind::InvalidInput,\n            ));\n        };\n\n        let mut result = Ok(());\n\n        match entry.flags() {\n            fts_sys::FTS_D if options.recursive_mode.is_recursive() => {\n                if root_dev_ino_check(root_dev_ino, file_dev_ino) {\n                    // This happens e.g., with \"chcon -R --preserve-root ... /\"\n                    // and with \"chcon -RH --preserve-root ... symlink-to-root\".\n                    root_dev_ino_warn(&file_full_name);\n\n                    // Tell fts not to traverse into this hierarchy.\n                    let _ignored = fts.set(fts_sys::FTS_SKIP);\n\n                    // Ensure that we do not process \"/\" on the second visit.","sourceCodeStart":518,"sourceCodeEnd":554,"githubUrl":"https://github.com/uutils/coreutils/blob/0b77ced48502a5f80c51dfa827af7e69f3687053/src/uu/chcon/src/chcon.rs#L518-L554","documentation":"Error \"Getting meta data\" thrown in uutils/coreutils.","triggerScenarios":"Occurs when chcon cannot read metadata of a file while applying security context changes.","commonSituations":"Files vanishing mid-operation, permission denied, or I/O errors while stating files.","solutions":["Verify the file exists and the process has permission to stat it.","Handle dangling symlinks by deciding whether to follow them before reading metadata."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0b77ced48502a5f80c51dfa827af7e69f3687053","analyzedAt":"2026-08-19T21:43:27.871Z","contentChangedAt":"2026-08-19T21:43:27.871Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}