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

Use -o when extracting with tar to give ownership to current user #1408

Merged
merged 1 commit into from
Jul 6, 2023

Conversation

sebjulliand
Copy link
Collaborator

Changes

Fixes #1405

For some reason (?) tar would give ownership of the deployed files to QSECOFR (always with /usb/bin's tar, not on files with /QOpensys' tar).

Using the -o flag (i.e. --no-same-owner) fixes the issue and gives owner of every extracted files to the currently connected user.

Checklist

  • have tested my change

@sebjulliand sebjulliand added the bug A confirmed issue when something isn't working as intended label Jul 3, 2023
@chrjorgensen
Copy link
Collaborator

@sebjulliand I gave this change a quick test - however, I wasn't able to recreate the problem: Even using /usr/bin/tar the correct owner was given on deployment.

Could you recreated the issue #1405 on your system? And how was your setup?

@sebjulliand
Copy link
Collaborator Author

I did reproduce it, yes, on this kind of system:

Remote system
Setting Value
IBM i OS V7R4M0
Tech Refresh 7
CCSID 65535
SQL Disabled
Source dates Disabled

Enabled features

/usr/bin /QOpenSys/pkgs/bin /QSYS.lib/ILEDITOR.lib /QSYS.LIB /QIBM/ProdData/IBMiDebugService/bin
attr bash GENCMDXML.PGM QZDFMDB2.PGM startDebugService.sh
iconv chsh GETNEWLIBL.PGM
setccsid ls
tar md5sum
sort
stat
Shell env
BUILDLIB=QGPL
CURLIB=QGPL
HOME=/home/arcad_pgmr/builds/merlin_company_system
LIBLS=QTEMP QGPL
LOGIN=arcad_pgmr
LOGNAME=arcad_pgmr
MAIL=/var/spool/mail/arcad_pgmr
OLDPWD=/home/ARCAD_PGMR
PATH=/QOpenSys/usr/bin:/usr/ccs/bin:/QOpenSys/usr/bin/X11:/usr/sbin:.:/usr/bin
PWD=/home/arcad_pgmr/builds/merlin_company_system
SHELL=/QOpenSys/pkgs/bin/bash
SHLVL=1
SSH_CLIENT=10.5.7.86 55580 22
SSH_CONNECTION=10.5.7.86 55580 10.5.11.40 22
TZ=<UTC>0
USER=arcad_pgmr
USERNAME=arcad_pgmr
_=/QOpenSys/usr/bin/env

It extracted everything and gave ownership to qsecofr:
image

It's running bash 4.4.

@edmundreinhardt
Copy link
Collaborator

Awesome work Seb!

Copy link
Contributor

@worksofliam worksofliam left a comment

Choose a reason for hiding this comment

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

Thank you @sebjulliand.

Much like @chrjorgensen, I was not able to recreate this on a 7.3 box I was using, but I really appreciate you sharing the system you recreated it on.

@worksofliam worksofliam merged commit a7f58f5 into master Jul 6, 2023
@sebjulliand sebjulliand deleted the fix/tarNoSameOwner branch July 6, 2023 13:30
@rogersonra
Copy link

I thought when Barry merged the commit into master I thought when I opened VSCode it would notify me to update the extension but it didn't. As I'm new to this when or how do I see this fix to confirm it is working on my end?
Thanks,
Rob

@worksofliam
Copy link
Contributor

@rogersonra the merge some not mean it has been released. I am hoping to get a new release (2.0.0) out this weekend.

@rogersonra
Copy link

@sebjulliand , thank you. I had a chance to test this today and everything is created with my user profile. Good job...

@sebjulliand
Copy link
Collaborator Author

@sebjulliand , thank you. I had a chance to test this today and everything is created with my user profile. Good job...

Awesome, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A confirmed issue when something isn't working as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deploying from local PC to IFS creates objects with qsecofr owner
5 participants