| Summary: | mkfs.ext4 changes folder permissions when creating image | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] OE-Core | Reporter: | Alessio Moscatello <a.m.mm.work> |
| Component: | devtools / tool chain | Assignee: | Robert Yang <liezhi.yang> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | Medium+ | CC: | meta.mr.watcher, meta.watcher, randy.macleod |
| Version: | 2.1.2 | ||
| Target Milestone: | 2.4 M4 | ||
| Hardware: | Other | ||
| OS: | Multiple | ||
| Whiteboard: | Backport to 2.3.1 & 2.2.2 | ||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | Don't know | |
|
Description
Alessio Moscatello
2017-06-13 10:04:01 UTC
Just an update: I've cross-checked and only folder permissions are wrong, file are correct. It seems that mkfs.ext4 forces rwx for user permission on folders and that permissions for group and other is the one specified in the recipe. Hello, I've found the rootcause in lib/ext2fs/mkdir.c, function ext2fs_mkdir: inode for folder is being created using a default umask inode.i_mode = LINUX_S_IFDIR | (0777 & ~fs->umask); this is ok when creating a filesystem from scratch, but causes permission changes when creating an image starting from a folder. I've a quick patch to fix the issue, but I think that the best solution is to add a parameter to mkfs in order to select if using or not the default umask when using -d option as well. BR, Alessio |