Fix EPERM Operation Not Permitted When Saving Files on Android
Question details
The user is unable to save a generated PDF file from a third-party application to their local Android storage due to an operation not permitted error.

- Product
- Android OS
- Device & OS
- Android
- Scenario
- Generating a quote in an app and attempting to save it as a PDF file to the device's local storage directory.
- Observed behavior
- The application fails to save the file and displays the error message: '/storage/emulated/0/...open failed: EPERM (operation not permitted)'.
Ensure your Android device operating system is up to date, and note down the exact app name that is displaying the EPERM error, as you will need to modify its system settings.
Grant Storage Permissions to the Application
The EPERM error is heavily tied to restricted access. Manually granting the 'Files and Media' permission to the app allows it to write files to your device's internal storage.
Modern Android versions (Android 11 and above) use Scoped Storage, which restricts apps from writing to the root directory without explicit user permission. If an app loses this permission, it triggers an EPERM (Error Permission) response.
Unlock your Android device and open the 'Settings' application from your home screen or app drawer.
Scroll down and tap on 'Apps' or 'Apps & notifications', then select 'See all apps' to view your installed applications.
Find and tap on the specific app you are trying to save the PDF from (e.g., your quote generation app).
Tap on 'Permissions', then select 'Files and media' (or 'Storage'). Change the access level to 'Allow management of all files' or 'Allow access to media only' depending on your Android version.
Close the application completely, reopen it, and attempt to save your PDF quote again.

Clear App Cache and Force Stop
If permissions are already granted but the error persists, clearing the app's cache can remove corrupted temporary data that might be blocking the save operation.
Create and Save PDF Quotes Flawlessly with WPS Office
If your current quote-making app constantly fails to save PDFs due to permission bugs, WPS Office provides a robust, professional alternative. You can easily design, save, and share business quotes directly from your Android device without compatibility or storage errors.
- 1. Start a New Document: Open WPS Office on your Android device and tap the '+' icon to create a new Document or Spreadsheet.
- 2. Choose a Quote Template: Select a suitable business template for your quote and fill in your product, pricing, and client details.
- 3. Export to PDF: Tap the 'Tools' menu (the four-square icon), navigate to the 'File' tab, and select 'Export to PDF'.
- 4. Save Without Errors: Choose your desired local save location (like Documents) or WPS Cloud, and tap 'Export' to save the file securely without EPERM errors.

Frequently Asked Questions
What exactly does the EPERM error mean on Android?
EPERM stands for 'Error PERMission'. It is a system-level error indicating that an application is trying to perform a specific action, such as writing a file to a protected directory, without having the required privileges granted by the Android operating system.
Why did my app suddenly lose storage permissions when it worked fine before?
This frequently happens after an Android system update enforces stricter storage policies. Additionally, modern Android devices feature an 'Auto-revoke permissions' setting that automatically removes an app's access to storage and media if the app hasn't been used for a few months.
Does the folder location affect the EPERM error?
Yes. Trying to save a file directly to the root storage directory (e.g., /storage/emulated/0/) often triggers this error because modern Android versions restrict root access. Try saving the file into standardized public directories like 'Documents' or 'Downloads' which are intended for user files.
Can I fix the EPERM error without reinstalling my app?
Yes, in most cases, reinstalling is not necessary. Manually navigating to your device's Settings > Apps, selecting the app, and re-granting 'Files and media' permissions will resolve the issue.




