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

Some kind of permission issue on Windows on subprocess.check_call #110

Open
put opened this issue Mar 18, 2020 · 0 comments · May be fixed by #153
Open

Some kind of permission issue on Windows on subprocess.check_call #110

put opened this issue Mar 18, 2020 · 0 comments · May be fixed by #153

Comments

@put
Copy link

put commented Mar 18, 2020

My question in a StackOverflow post, I'm just gonna paste it here:

I'm trying to edit the frida-ios-dump project to actually work for on my PC and I'm currently running into a weird issue that I think has to do with permissions somehow.

chmod_dir = os.path.join(PAYLOAD_PATH, os.path.basename(dump_path))
chmod_args = ('chmod', '655', chmod_dir)
try:
    subprocess.check_call(chmod_args)
except subprocess.CalledProcessError as err:
    print(err)

This piece of code here throws this error: FileNotFoundError: [WinError 2] The system cannot find the file specified but I had a good feeling that that file DID in fact exist, so I added the following except:

except FileNotFoundError:
    print(chmod_dir)
    print("FileNotFound, yet path exists: " + str(os.path.exists(chmod_dir)))

And as suspected, the file DOES exist! My code prints FileNotFound, yet path exists: True
and since I also printed the path, we can see that here: C:\Users\Admin\AppData\Local\Temp\Payload\protobuf.fid and upon manually visiting that folder, I confirmed that the file does indeed exist there.

I have a strong feeling that this is some permission problem, but I'm not sure what I could do to fix it.

Note: The Python script is ran from Windows PowerShell which in turn was opened with administrator privileges.

@ViRb3 ViRb3 linked a pull request May 3, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant