Make install creates db_user file in server_priv with wrong permissions

Description

While doing a source code installation if database user name is given then db_user file is created under server_priv directory. File permission should be 600 but the file is created with permission 644.

Acceptance Criteria

None

Activity

Show:
pbsproadmin
March 31, 2016, 8:51 PM

<p></p>

<p style='font-size:12pt;font-family:Times New Roman, serif;color:rgb(0, 0, 0);'><span style='font-family:calibri,sans-serif;'><span style='font-size:11pt;'>Hi Sam,</span></span></p>

<p style='font-size:12pt;font-family:Times New Roman, serif;color:rgb(0, 0, 0);'><span style='font-family:calibri,sans-serif;'><span style='font-size:11pt;'>JIRA ticket PBS-14655 describes how pbs_probe is broken in the OSS release, and PBS-14582 requests that pbs_probe be redesigned such that it is easier to maintain. This is definitely an area that needs attention, assuming we want to retain pbs_probe as a diagnostic tool.</span></span></p>

<p style='font-size:12pt;font-family:Times New Roman, serif;color:rgb(0, 0, 0);'><span style='font-family:calibri,sans-serif;'><span style='font-size:11pt;'>The “make install” target was fundamentally broken in the mainline branch, but is now fixed in the OSS branch. The automake tool decides the location and permissions to assign each file based on the type defined in Makefile.am files. Permissions may be modified by overriding them in the spec file rpmbuild uses to generate the RPM.</span></span></p>

<p style='font-size:12pt;font-family:Times New Roman, serif;color:rgb(0, 0, 0);'><span style='font-family:calibri,sans-serif;'><span style='font-size:11pt;'>It's not really a concern for the private preview, but we’ll want to address it before we release the open source package.</span></span></p>

<p style='font-size:12pt;font-family:Times New Roman, serif;color:rgb(0, 0, 0);'><span style='font-family:calibri,sans-serif;'><span style='font-size:11pt;'>Thanks,</span></span></p>

<p style='font-size:12pt;font-family:Times New Roman, serif;color:rgb(0, 0, 0);'><span style='font-family:calibri,sans-serif;'><span style='font-size:11pt;'>Mike</span></span></p>

nithin johnson
September 14, 2017, 12:17 PM

I'm seeing db_user file with correct permissions.
root@CentOS: pbs# ls -l server_priv/
total 32
drwxr-xr-x. 2 root root 51 Sep 14 09:05 accounting
rw------. 1 root root 6 Sep 13 13:42 comm.lock
rw------. 1 root root 32 Sep 12 13:14 db_password
rw------. 1 root root 6 Sep 12 13:14 db_svrhost
rw------. 1 root root 8 Sep 12 13:14 db_user
drwxr-x---. 3 root root 4096 Sep 13 13:37 hooks
drwxr-x---. 2 root root 6 Sep 12 13:14 jobs
rw------. 1 root root 29 Sep 13 13:44 prov_tracking
rw-rr-. 1 root root 0 Sep 13 13:37 resourcedef
rw------. 1 root root 6 Sep 13 13:44 server.lock
rw------. 1 root root 0 Sep 13 14:15 svrlive
drwx------. 2 root root 19 Sep 13 14:15 topology
rw------. 1 root root 0 Sep 12 13:14 tracking
rw------. 1 root root 24 Sep 14 17:30 usedlic
drwxr-x---. 2 root root 6 Sep 12 13:14 users

The following lines in the pbs_habitat will create db_user file and it is getting created with correct permissions.

  1. create the database user file if it does not exist
    if [ ! -f "${dbuser_fl}" ]; then
    printf "${PBS_DATA_SERVICE_USER}" >"${dbuser_fl}"
    chmod 0600 "${dbuser_fl}"
    fi

Assignee

Unassigned

Reporter

Former user

Severity

None

OS

None

Start Date

None

Pull Request URL

None

Components

Fix versions

Priority

High
Configure