-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
cmd with runas and cwd gives problems #586
Milestone
Comments
It seems that "su - " sets the environment and resets the cwd. The cwd can be set back by prefixing the command with a "cd" statement, which is what the following patch does:
|
arthurzenika
pushed a commit
to arthurzenika/salt
that referenced
this issue
Sep 17, 2013
arthurzenika
pushed a commit
to arthurzenika/salt
that referenced
this issue
Sep 17, 2013
tacerus
pushed a commit
to tacerus/salt
that referenced
this issue
May 30, 2024
* Mark Salt 3006 as released Without this, commands like ``` salt '*' salt_version.equal 'Sulfur' ``` will not work properly and return False although Salt 3006 is used. Signed-off-by: Dominik Gedon <[email protected]> * Fix detection of Salt codename by salt_version module * Fix mess with version detection bad version definition * Add some new and fix unit tests * Fix SaltStackVersion string for new versions format * Do not crash when passing numbers to 'salt_version.get_release_number' * Fix salt_version execution module documentation --------- Signed-off-by: Dominik Gedon <[email protected]> Co-authored-by: Pablo Suárez Hernández <[email protected]>
meaksh
added a commit
to meaksh/salt
that referenced
this issue
Nov 12, 2024
* Mark Salt 3006 as released Without this, commands like ``` salt '*' salt_version.equal 'Sulfur' ``` will not work properly and return False although Salt 3006 is used. Signed-off-by: Dominik Gedon <[email protected]> * Fix detection of Salt codename by salt_version module * Fix mess with version detection bad version definition * Add some new and fix unit tests * Fix SaltStackVersion string for new versions format * Do not crash when passing numbers to 'salt_version.get_release_number' * Fix salt_version execution module documentation --------- Signed-off-by: Dominik Gedon <[email protected]> Co-authored-by: Pablo Suárez Hernández <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Because it sets the environment (using "su - user -c command"), the cwd is ignored and the command is ran from the users homedirectory. There is an option with_env, but its not proper implemented yet. Also, I cant override the with_env from the run command.
The text was updated successfully, but these errors were encountered: