Questions tagged [file-permissions]

Use this tag if your issue is with permissions in the file system (files & directories). For app permissions, use the 'permissions' tag instead.

What are file permissions?

Android uses Linux at its core, and Unix/Linux use a special permission system on files:

  • each file has an owner (single user), and a group (user group) it is owned by
  • permissions are granted to the owner, the group, and "others" (neither being the user nor belonging to the group)
  • permissions basically consist of being allowed to read, write, and execute a file (in case of a directory, "execute" means to change into it)

Thus a permission-set basically consists of three groups, prefixed by a "type":

  • drwxrwxrwx would be a directory with full permissions to everybody
  • -rwx------ would be a very private file (only the owner has permissions to do everything with it)
  • -rw-rw--- looks like a document/data file read- and writable by the owner and the group.

Related tags:

Further readings

167 questions
26
votes
3 answers

No permissions for Termux to access internal storage - even for reading

Using the termux (https://termux.com) terminal-emulation program, I type the following command: ls /sdcard I get the following error: ls: can't open '/sdcard': Permission denied Realizing that the /sdcard directory on Android is a symlink, I tried…
user3080003
  • 369
  • 1
  • 3
  • 4
23
votes
5 answers

`adb pull /data` fails with "0 files pull 0 file skipped"

I have rooted my device HTC Evo Design 4G and I try to adb pull /data data and it says "0 files pull 0 file skipped" I was able to pull /System/build.prop. How can I pull the root folder?
user3734225
  • 351
  • 2
  • 3
  • 7
16
votes
2 answers

How to access /storage/emulated/10 (multi-users env) in adb shell on Android 9+ without root access?

I have two Android system users configured. $ pm list users Users: UserInfo{0:Owner:13} running UserInfo{10:security space:13} running UserInfo{999:XSpace:800010} running When the mobile is running at Android 8.1, I can access the…
sgon00
  • 392
  • 2
  • 3
  • 14
12
votes
2 answers

adb "Permission denied" to run a "./configure" file

I need to run a configure file into my android phone so I think the best way to do this is to use the adb shell command. I'm running an Android emulator onto a Windows-7 platform, and there I'm running the adb shell command into a DOS window. Using…
grattmandu03
  • 231
  • 1
  • 2
  • 7
11
votes
1 answer

Why can I not assign exec permissions to a file on the SD card?

shell@android:/sdcard/SW # ls -l -rw-rw-r-- root sdcard_rw 128 2012-09-22 11:42 usb0config.sh shell@android:/sdcard/SW # chmod 777 usb0config.sh shell@android:/sdcard/SW # ls -l -rw-rw-r-- root sdcard_rw …
Victor S
  • 223
  • 1
  • 2
  • 7
11
votes
1 answer

Changing file permissions with root, will they remain if I unroot?

I currently use the run-as command through adb to be able to access the data folder of an app that I am developing directly on my phone using AIDE. When connecting to the phone locally, using connectbot, I can find the run-as command in /system/bin/…
Russ Wheeler
  • 243
  • 3
  • 9
10
votes
2 answers

Write permission on certain paths, like the SD card (extSdCard)

In an attempt to transfer a file from a remote server to an Android device I ran into permission problems. It turns out that I do not have a write permission at the location of the SD card (/mnt/extSdCard). I am using SSHDroid as an ssh server on…
Mussé Redi
  • 203
  • 1
  • 2
  • 9
10
votes
1 answer

Can't use chmod to alter permissions on emulated phone

So, I'm trying to make an app in android studio and I need to reference a particular file in the app, cascade.xml. I've pushed it onto the emulated phone no problem using adb (it's in the storage/sdcard folder). However, the app still can't access…
Rachel L
  • 391
  • 1
  • 2
  • 10
8
votes
2 answers

How to change the modified date of a file without root?

How do I change the modified date of a file, specifically PNGs, on Android without root? Total Commander failed to do it with a permission error Access Denied.
Bernard
  • 181
  • 1
  • 1
  • 4
8
votes
3 answers

adb push ... Permission denied

I am trying to push a file to a directory on a physical android device, but I am running into the following error. >adb push data.db /data/data/com.me.app/databases failed to copy 'data.db' to '/data/data/com.me.app/databases/data.db': Permission…
yohosuff
  • 241
  • 1
  • 2
  • 8
7
votes
1 answer

SimpleSSHD - create reusable user/password?

I have downloaded SimpleSSHD (aka Dropbear) to access my Android via SSH. I am able to do so with the one-time password, but I'm trying to write a Python script that can access the phone. Is there a way to add a "username/password" to SimpleSSHD so…
BruceWayne
  • 425
  • 2
  • 7
  • 15
7
votes
2 answers

What file systems can I use for a 128GB sdcard on Android 7.1, used as portable storage

I can't find an answer to this on StackExchange. I have a phone running beta LineageOS 14.1 (Android 7.1), and a 128GB SDXC card which I want to use as portable/shared storage between devices. I know that the built in Settings -> Storage -> "format…
Stilez
  • 586
  • 3
  • 8
  • 18
7
votes
3 answers

Run downloaded shell command without root?

My phone is a Galaxy S3, not rooted. I have "ES File Explorer" and "Terminal Emulator" installed. I downloaded an Android build of 'wget', intending to execute it from the Terminal Emulator app. The file currently exists…
Chungzuwalla
  • 173
  • 1
  • 1
  • 4
7
votes
2 answers

how to transfer files to new external sdcard

I have an old 64 GB sdcard and a new 128 GB sdcard, how do I copy over all files from my old card to my new in a way that makes android treat the new card just as the old card. I tried simply copy-pasting over my DCIM folder, then I put the new…
jcr
  • 189
  • 2
  • 9
6
votes
1 answer

How much of the Android filesystem is visible over MTP?

When I plug in my Android device to my computer it gets connected as a media device under MTP mode. I can browse a bit of the folders on my device via my computer. I'm wondering how much of the device am I actually able to see? What sort of folders…
jxramos
  • 625
  • 1
  • 7
  • 16
1
2 3
11 12