Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-8615

bad permissions on description/camera/camera.py in obs_lsstSim

    Details

    • Type: Bug
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: obs_lsstSim
    • Labels:
      None

      Description

      the file description/camera/camera.py in obs_lsstSim has permissions 600. This makes it impossible on shared stacks for anyone but the user who installed the stack to read in the LSST camera model. The file needs to at least have permissions 644 (i.e. readable by 'group' and 'other'). FYI description/camera/camera.py is created when you run scons on obs_lsstSim.

      If there was some way we could add a unit test that tested for a failure of this kind, that would also be nice.

        Attachments

          Issue Links

            Activity

            Hide
            danielsf Scott Daniel added a comment -

            As the one who opened the ticket, I only intended that the ticket fix whatever was causing the stack to create camera.py with the restrictive permissions. In the individual case of "my" shared stack, I had enough access to change the permissions of camera.py myself by hand (if that is what Tim Jenness is asking).

            Show
            danielsf Scott Daniel added a comment - As the one who opened the ticket, I only intended that the ticket fix whatever was causing the stack to create camera.py with the restrictive permissions. In the individual case of "my" shared stack, I had enough access to change the permissions of camera.py myself by hand (if that is what Tim Jenness is asking).
            Hide
            tjenness Tim Jenness added a comment -

            Ok. I was confused as to whether the files in question were committed to the repo with the wrong permissions or created at build time with the wrong permissions.

            Show
            tjenness Tim Jenness added a comment - Ok. I was confused as to whether the files in question were committed to the repo with the wrong permissions or created at build time with the wrong permissions.
            Hide
            Parejkoj John Parejko added a comment -

            See my first comment above: the files are now created at build-time. I'm guessing in the past (when they had been checked in), someone had manually fixed the permissions after building them.

            Show
            Parejkoj John Parejko added a comment - See my first comment above: the files are now created at build-time. I'm guessing in the past (when they had been checked in), someone had manually fixed the permissions after building them.
            Hide
            Parejkoj John Parejko added a comment -

            Two comments in review, the main one being whether we should make this a function (in lsst.utils?) since we might want this elsewhere and it's not obviously straightforward (agreed about the sadness of python's umask interface).

            Show
            Parejkoj John Parejko added a comment - Two comments in review, the main one being whether we should make this a function (in lsst.utils?) since we might want this elsewhere and it's not obviously straightforward (agreed about the sadness of python's umask interface).
            Hide
            jhoblitt Joshua Hoblitt added a comment -

            The patch was reworked to chmod the source tempfile before being renamed and to use shutil.move in place of os.rename.

            It is probably worth doing a search of pypi for a module that 'improves' upon the tempfile interface before we add a wrapper method.

            Show
            jhoblitt Joshua Hoblitt added a comment - The patch was reworked to chmod the source tempfile before being renamed and to use shutil.move in place of os.rename . It is probably worth doing a search of pypi for a module that 'improves' upon the tempfile interface before we add a wrapper method.

              People

              • Assignee:
                jhoblitt Joshua Hoblitt
                Reporter:
                danielsf Scott Daniel
                Reviewers:
                John Parejko, Tim Jenness
                Watchers:
                John Parejko, Joshua Hoblitt, Scott Daniel, Simon Krughoff, Tim Jenness
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Summary Panel