Bug 582548 - [mknod] umask shouldn't take effect when mode is set explicitly
Summary: [mknod] umask shouldn't take effect when mode is set explicitly
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libguestfs
Version: unspecified
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-04-15 09:58 UTC by Yufang Zhang
Modified: 2010-05-21 00:31 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-04-19 19:58:03 UTC
Embargoed:


Attachments (Terms of Use)

Description Yufang Zhang 2010-04-15 09:58:42 UTC
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 10:07:52 UTC
This is expected. For the default umask is 022.

Comment 2 Yufang Zhang 2010-04-16 02:40:06 UTC
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 10:18:26 UTC
(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 19:58:03 UTC
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 19:11:50 UTC
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 22:25:20 UTC
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 12:42:10 UTC
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-21 00:31:01 UTC
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.