The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com

Bug #14360

Symbolic modes mis-handle the capital X option.

Added by Trevor Vaughan almost 2 years ago. Updated 9 months ago.

Status:Needs DecisionStart date:05/08/2012
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:file
Target version:-
Affected Puppet version:2.7.13 Branch:
Keywords:file, symbolic mode

We've Moved!

Ticket tracking is now hosted in JIRA: https://tickets.puppetlabs.com

This ticket may be automatically exported to the PUP project on JIRA using the button below:


Description

Setting the mode on a directory to recursively be ‘u+rwX,g+rX,o-rwx’ causes the execute bit to be flipped on for the files under the directory.

The Capital X option should only add execute permissions if the object is a directory.


Related issues

Related to Puppet - Feature #2927: Symbolic Modes for the File type. Closed 12/14/2009

History

#1 Updated by Trevor Vaughan almost 2 years ago

As a corrolary to this, setting -x on a directory removes the execute bits.

This should retain the execute bits on directories just like using the normal file modes in puppet.

#2 Updated by Daniel Pittman almost 2 years ago

  • Status changed from Unreviewed to Needs More Information

Trevor, is this only true for recursive operations, or do you also see it on individual files managed without recursion?

#3 Updated by Trevor Vaughan 12 months ago

Aaaaaaaannnd, I’m back.

This should also be true for individual files without recursion since it works that way at the command line.

#4 Updated by Daniel Pittman 12 months ago

  • Assignee deleted (Daniel Pittman)

#5 Updated by Michael Bacon 9 months ago

I’d like to re-open this with more information.

The capital X symbolic mode appears to do the wrong thing regardless of whether it’s an individual file or a recursive directory:

Before puppet run:

$ ls -lR testperms.*
-r--r--r--. 1 XXX XXX    0 Aug  1 11:38 testperms.444.gX
-r--r--r--. 1 XXX XXX    0 Aug  1 11:39 testperms.644.gX

testperms.dir.755.gX:
total 0
-r--r--r--. 1 XXX XXX 0 Aug  1 11:38 testperms.444.gX
-r--r--r--. 1 XXX XXX 0 Aug  1 11:39 testperms.644.gX

Puppet code:

  file { '/tmp/testperms.444.gX':
    mode => 'g+X',
  }

  file { '/tmp/testperms.644.gX':
    mode => 'g+X',
  }

  file { '/tmp/testperms.dir.755.gX':
   mode => 'g+X',
   recurse => true,
  }

After puppet run:

$ ls -lR testperms.*
-r--r-xr--. 1 XXX XXX    0 Aug  1 11:38 /tmp/testperms.444.gX
-r--r-xr--. 1 XXX XXX    0 Aug  1 11:39 /tmp/testperms.644.gX

testperms.dir.755.gX:
total 0
-r--r-xr--. 1 XXX XXX 0 Aug  1 11:42 testperms.444.gX
-rw-r-xr--. 1 XXX XXX 0 Aug  1 11:42 testperms.644.gX

Please re-open this case.

#6 Updated by Michael Bacon 9 months ago

  • Status changed from Needs More Information to Needs Decision

Changing status so maybe it gets noticed.

Also available in: Atom PDF