Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DLPX-93502 LTS 24.04: delphix home directory requires 755 permissions to allow SFTP tests to pass #796

Conversation

palash-gandhi
Copy link
Contributor

@palash-gandhi palash-gandhi commented Feb 26, 2025

Problem

A few unit tests failed like this: https://selfservice-jenkins.eng-tools-prd.aws.delphixcloud.com/job/integration-tests/job/split-precommit-dxostest/job/os-upgrade/22/testReport/com.delphix.appliance.server.dhm.test/SshManagerTest/uploadScriptWithSCP/

com.delphix.appliance.server.dhm.SshManager$RemoteFileTransferException: SCP operation failed for remote file: /export/home/delphix/tmpuser9119
...
...
Caused by: net.schmizz.sshj.xfer.scp.SCPRemoteException: Remote SCP command had error: scp: /export/home/delphix/tmpuser9119: Permission denied

Solution

I compared the permissions on the delphix user's home directory and noticed a difference.
On 20.04:

drwxr-xr-x 8 delphix    staff      15 Feb 26 18:21 delphix

On 24.04:

drwxr-x--- 8 delphix    staff      12 Feb 26 05:50 delphix

Fixing the permissions allowed the unit tests to pass.

Testing Done

ab-pre-push: https://selfservice-jenkins.eng-tools-prd.aws.delphixcloud.com/job/appliance-build-orchestrator-pre-push/10476/

@palash-gandhi palash-gandhi force-pushed the dlpx/pr/palash-gandhi/111c0fbb-d0fc-4f88-b581-ecea3327e6a7 branch from 07c9bdd to 9be2a06 Compare February 26, 2025 22:29
@palash-gandhi palash-gandhi marked this pull request as ready for review February 27, 2025 02:17
Comment on lines +46 to +51
- name: Set 755 permissions on Delphix home directory
file:
path: /export/home/delphix
mode: 0755
state: directory

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CIS requires 750 permissions on home directories, so doing this will likely cause us heart-ache with CIS benchmarks. Instead, we should fix the test so that it doesn't try and put random files in the delphix user's home directory if it's not running as the delphix user.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, moved here: https://github.com/delphix/dlpx-app-gate/pull/2923. Closing this PR

@palash-gandhi
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants