Skip to content

os/exec: exec.Command won't execute hidden files in Linux #11252

@guitmz

Description

@guitmz

I have been facing a weird problem here and as last resort, I changed the file from being hidden to regular and the exec ran fine. This is the only change I made in the code at all.

Here's an example.

Not working:

cmd := exec.Command("./.file") //notice the file starts with a dot, this will NOT work 
cmd.Start() //execute it

Working:

cmd := exec.Command("./file")  //Works fine!!!
cmd.Start() //execute it

Sorry if this is meant to happen but well, you should be able to exec whatever you want in my opinion.

Thanks

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions