Bug 582548 - [mknod] umask shouldn't take effect when mode is set explicitly
[mknod] umask shouldn't take effect when mode is set explicitly
Status: CLOSED WONTFIX
Product: Virtualization Tools
Classification: Community
Component: libguestfs (Show other bugs)
unspecified
All Linux
low Severity medium
: ---
: ---
Assigned To: Richard W.M. Jones
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-04-15 05:58 EDT by Yufang Zhang
Modified: 2010-05-20 20:31 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-04-19 15:58:03 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Yufang Zhang 2010-04-15 05:58:42 EDT
Description of problem:
Trying to create a new device file via mknod-b(block device file) or mknod-c(char device), the permission of the newly created file is not correctly by mknod. 

Version-Release number of selected component (if applicable):
libguestfs-1.0.85-1.fc12.3.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Create a new device file via mknod-b
><fs> mknod-b  0770 8 1 /dev/sdg
2. Check the permission of the device file
><fs> ll /dev/sdg
brwxr-x--- 1 root root 8, 1 Apr 15 09:46 /sysroot/dev/sdg
  
Actual results:
The permission is not set correctly.


Expected results:
Permission is set correctly.


Additional info:
For char file, the permission is also not set correctly.
><fs> mknod-c  0770 5 1 /dev/char
><fs> ll /dev/char 
crwxr-x--- 1 root root 5, 1 Apr 15 09:50 /sysroot/dev/char
Comment 1 Yufang Zhang 2010-04-15 06:07:52 EDT
This is expected. For the default umask is 022.
Comment 2 Yufang Zhang 2010-04-15 22:40:06 EDT
Reopen this bug for it it unreasonable for umask to take effect when mode has been set explicitly.
Comment 3 Richard W.M. Jones 2010-04-17 06:18:26 EDT
(In reply to comment #2)
> Reopen this bug for it it unreasonable for umask to take effect when mode has
> been set explicitly.    

I think we need a 'mknod-mode' command.
Comment 4 Richard W.M. Jones 2010-04-19 15:58:03 EDT
We cannot change this (it's ABI).

See also:

https://bugzilla.redhat.com/show_bug.cgi?id=583554#c1
Comment 5 Fedora Update System 2010-04-20 15:11:50 EDT
libguestfs-1.2.3-1.el5 has been submitted as an update for Fedora EPEL 5.
http://admin.fedoraproject.org/updates/libguestfs-1.2.3-1.el5
Comment 6 Fedora Update System 2010-04-20 18:25:20 EDT
libguestfs-1.2.3-1.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/libguestfs-1.2.3-1.fc13
Comment 7 Fedora Update System 2010-04-21 08:42:10 EDT
libguestfs-1.2.3-1.fc12.6 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/libguestfs-1.2.3-1.fc12.6
Comment 8 Fedora Update System 2010-05-20 20:31:01 EDT
libguestfs-1.2.3-1.el5 has been pushed to the Fedora EPEL 5 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.