Why do I get a Windows file permission error (IO Error 13) with Android SDK when writing to files starting with a dot?

Running Titanium Appcelerator 0.8.1 on a Windows XP Virtual Machine, with Android SDK 2.1

When running build/install app, getting the following error (last line broken for display here):

[TRACE] f = open(os.path.join(dest, dest_file), "w")
[TRACE] IOError: [Errno 13] Permission denied:
  'C:\\Documents and Settings\\firstname.surname\\Desktop\\MyApp\\build\\android\\.classpath'

Removing .classpath results in .classpath being created, but the error simply moves onto the next file it has to write to.

The files are in a git repository, checked out via msysgit, but the same error occurs when the files are copied directly from the git server to the Windows machine. Unfortunately the Titanium dev app won't rebuild the Android package for an existing app if the build\android files are missing, so it's not possible just to not check these into git.

The files appear to have the correct permissions - are writable by the current user account, don't have the read-only flag set (checked via 'attrib'), and have set the access options and owner via the Security/Advanced dialogues on the files and directories (and checked by a Windows IT admin here)

As far as I can tell, nothing else has the file open (a possible cause of IOError 13).

What could be the reason here? Could Git be the culprit?

Asked by: Rebecca769 | Posted: 20-01-2022

Answer 1

Answering my own question in case anyone else gets the same issue:

  • removing the hidden flag (with attrib -H) fixes the file permission problem.

(the Hidden flag was set by msysgit, to match the 'hidden' nature of dotfiles in Unix)

Answered by: Kellan136 | Posted: 21-02-2022

Similar questions

Permission issue while starting a service from android

I have written a service as part of an application. I try to call this service from a second application using the following code: Intent intent = new Intent () ; intent.setClassName("com.test" ,"com.test.DownloadService") ; // Create a new Messenger for the communication back Messenger messenger = new Messenger(handler); intent.putExtra("MESSENGER", messenger); intent.setData(Uri.pa...

android - Permission Denial: starting Intent

I just splitted my App in a Pro and Free version. Therefore I made my application a library and created two new projects. The free version kept the namespace "com.mxp.time" and the pro version got the namespace "com.sourcecastle.mytime". So the free version has the same namespace as my library. Everything works fine except when I start a activity from prefere...

android - Permission Denial: starting Intent not exported from uid

I came to this problem when I open an app which already installed in my phone from my own app . Permission Denial: starting Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.qq.reader/.widget.picbrowser.PictureActivity } from ProcessRecord{3823559b 16851:com.pax.market.android.app/u0a322} (pid=16851, uid=10322) not exported from uid 10324

android - Permission Denial: starting Intent sharing with gmail

I tried to share some text with gmail in my app : String shareBody = "bla bla bla"; Intent sharingIntent = new Intent(Intent.ACTION_VIEW); sharingIntent.setType("plain/text"); sharingIntent.setClassName("com.google.android.gm", "com.google.android.gm.ComposeActivityGmail"); sharingIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "bla bla bla"); sharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, ...

Android appium Permission Denial: starting Intent

Anyone can help me to see this permission issue is due to the app which I need developer to re-build with permission open? or it is my adb command issue? or the intent argument is used wrongly? At android phone, 1st screen: com.ninetest.hd3.test.testDetectActivity 2nd screen: com.ninetest.hd3.activity.MailActivity When executing adb command with 1st screen, error occurred. if I ch...

android - Permission Denial: starting intent (React Native)

I am trying to create 2 activity aliases to trigger a icon change event inside React-Native. I am trying to run my app,but i get an error inside AndroidManifest.xml. Does anybody know the answer? <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.projectname"> <uses-permission android:name="android.permission.INTERNET" /> <app...

android - Permission Denial : Starting Intent ( lock task mode / kiosk mode )

Any one have a suggestion how to solve this error ? I am trying to run lock task with intent getLaunchIntentForPackage but I have no idea why this error is coming and which type of permission it wants to run this task. java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 pkg=com.example.videopla...

android - Permission denied: File created in .../files

I'm creating a file in data/data/myPackage/files/ : file = new File( getFilesDir() + "/file.txt"); I'm absolutely sure that the file is created. Right after its creation I call: file.canWrite(); and the result is true. When I try to use that file I get: "Permission Denied". In Eclipse, in DDMS, this file permissions are like:

java - Permission to write to the SD card

I would like my app to archive the application DB to the SD card. In my code I check if the directory canWrite() exists, and if not, throw an IOException. In this particular instance, I am trying to copy the db file to the root directory on the SD card, but it's throwing an IOException. How can I change the permission on a folder/file to be able to write to it?

android - ADB pull command permission

I do have a question in using ADB command in console. I know that user doesn't have a permission to access /system in shell without root permission as a default. But when I execute "adb pull /system/app /myApps" in a window console, not shell mode, it works properly. I mean, all apk files is copied into my desktop location without any problem. Is it normal case? I got a root permission using exploit before. So, I'm...

android - Which permission do I have to add to the manifest to get gps sensor readings?

Which permission needs my application to get access to the location of the user on Android?

android - Permission to read another app's data?

Is there a permission to allow one app to read the (private) data/data//files/... files of another application? If not, how do backup programs like MyBackup work? C

sqlite - sqlite3 permission denied android

I'm trying to access the database of the application I'm developping directly on my Nexus, but I get a "permission denied" when I tried to execute the "sqlite3" command. I also tried to start the adb in root mod, but again, permission denied on the device... I guess I will have to do that with the emulator but I have a lot of data to load and it would have been 10 times faster with the phone on Wifi than the emulator... Un...

Is it possible to change the permission on files in an Android app's internal storage?

I downloaded a file with an app and stored it inside of its internal storage, but the file is set with -rw------- and I want to change those permissions so is it possible? I know that using external storage is an option but I want to know if I can do it with internal storage too. Thanks for the help. Edit: If it turns out that I can't change the permission is there some shared region of internal storag...

android wifi permission

I don't understand why i need to add WAKE_LOCK permission to the application manifest when I toggle wifi with setWifiEnabled... Any idea ?

Why does the SQLite 3 command using the Android ADB shell return "permission denied"?

Specifically, I was trying to use the sqlite3 command with the ADB shell to run some queries on the database of the Android application I'm building. I kept getting "sqlite3: permission denied". I'm developing on a Nexus One that I purchased from Google. Does my phone need to be rooted or something? $ sqlite3 /data/data/com.moodme.android/databases/moodme.db sqlite3 /data/data/com.moodm...

Android: Force closing for lack of permission which is located in the manifest

I'm trying to delete a bookmark using contentResolver.delete() and I get force close for missing permission "com.android.broswer.permission.WRITE_HISTORY_BOOKMARKS" but it's in the manifest... this is in the manifest (outside <application></application>) <uses-permission android:name="com.android.browser.permission.READ_HISTORY_BOOKMARKS"...

Still can't find your answer? Check out these communities...

Android Google Support | Android Community | Android Community (Facebook) | Dev.io Android