Ticket #1031 (closed defect: fixed)

Opened 12 years ago

Last modified 12 years ago

POSIX client tool for device creation doesn't set mode correctly

Reported by: Owned by: solj
Priority: major Milestone: Bcfg2 1.2.0 Release
Component: bcfg2-client Version: 1.0
Keywords: Cc:


It appears that when assigning a mode attribute to a Path of type device the permission created on disk is not as expected.

<Path type='device' name='/var/lib/bind/dev/null' owner='root' group='root' dev_type='char' major='1' minor='3' mode='0777'/>

Results in a file with permissions 0755.

The calcPerms method in Client/Tools?/ returns a value sent to os.mknod. It is not clear whether the problem is with os.mknod and the permissions mask or the value generated by calcPerms.

docs for os.mknod:

"mode specifies both the permissions to use and the type of node to be created, being combined (bitwise OR) with one of stat.S_IFREG, stat.S_IFCHR, stat.S_IFBLK, and stat.S_IFIFO (those constants are available in stat)"

Could this either be fixed to work as expected or the correct mode setting be documented? mode is not listed at


Change History

comment:1 Changed 12 years ago by solj

  • Owner changed from desai to solj
  • Status changed from new to accepted

comment:2 Changed 12 years ago by solj

  • Status changed from accepted to closed
  • Resolution set to fixed

WARNING! You need to establish a session before you can create or edit tickets. Otherwise the ticket will get treated as spam.


Add a comment

Modify Ticket

Change Properties
<Author field>
as closed
The resolution will be deleted. Next status will be 'reopened'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.