Skip to content

Unable to execute a bash function #29

@YorkZ

Description

@YorkZ

For example, if I have a bash function defined in a script:

function foo()
{
}

and trying to run it as another user in the same script:

su-exec user-foo foo

I would get an error, something similar to "file foo not exist ...."

As a compassion, the su command works in this scenario:

export -f foo
su user-foo -c foo

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions