Hi guys
I have a S3 (running CM10) and I'm facing a problem with the internal SDCard: I cant' delete two folders I created.
What I did is:
- I create two folders using FileZilla connnecting through SHH with SSHDroid
- I want to remove them and have problems from FileZilla interface
- If I connect from SSH I can remove all the stuff in /storage/sdcard0 except the two folders. I'm root and it says permission denied. i.e I want to make a ls
Code:
ls folder/
ls: can't open 'folder/': Permission denied
- Additional to this strange behaviour, I notice that I can rename the folder without problems, even copy to /data or another rw fylesystem but I can't cut the folder or delete it from the internal sdcard
With the rename option I rename the folders to .garbage and .trash but I can't delete them either
- I tried creating two folders with same name in my PC and upload them to the phone to overwrite the original ones and get Permission problems again
- Create a file inside the folders fails too
Code:
# touch .garbage/algo
touch: .garbage/algo: Permission denied
From CMW I go to the option Mounts & storage->Format sdcard and I have this output:
Code:
Formatting /sdcard...
Error mounting /sdcard!
Skipping format...
Done.
Expected since there is no a specific mount point for the internal SDCard. I tried hard reset (*2767*3855#) without results, I think the code is Samsung dependent and has no effect on CM10
It beign shared memory and no particular mount point complicates everything, I can't run fdisk i.e and in that case I don't even know which format do I have to give to the 'partition' because /storage/sdcard0 appears to be mounted with fuse. I only see something that gets my atention when I look for mounted filesystems
Code:
/dev/fuse on /storage/sdcard0 type fuse (rw,nosuid,nodev,relatime,user_id=1023,group_id=1023,default_permissions,allow_other)
/storage/sdcard0/ is mounted as user and group especific ID in theory it can't affect me because I'm root, but it does
If you need additional info just let me know
Thanks in advance
Guys, I finally figure out how to delete the folders
I discover by executing 'ps' that 1023 ID belongs to media_rw user with wich the /data/media folder is mounted. I think login as media_rw should do the trick but what I did in order to delete the folders was:
1. Login as root (unnecesary if connected via SSH with SSHDroid)
Code:
su
2. Mount /system with write permissions
Code:
mount -o rw,remount -t ext4 /dev/block/mmcblk0p9 /system
3. Run sdcard command again (as root)
Code:
/system/bin/sdcard /data/media 1023 1023
4. Go to /data/media and delete the unwanted folders (let's say they are called .trash y .garbage)
Code:
rm -rf .trash .garbage
5. Mount /system with read only permissions again (for security reasons)
Code:
mount -o ro,remount -t ext4 /dev/block/mmcblk0p9 /system
6. Check that the folders doesn't exists
Code:
ls -lsa /data/media/
the output must be something like this (no .trash or .garbage folders in here )
Code:
# ls -lsa /data/media/
total 443361
4 drwxrwxr-x 14 media_rw media_rw 4096 Oct 12 10:25 .
4 drwxrwx--x 23 system system 4096 Oct 12 06:01 ..
4 drwxrwxr-x 2 media_rw media_rw 4096 Oct 12 06:06 .mmsyscache
4 drwxrwxr-x 2 media_rw media_rw 4096 Oct 12 06:01 Alarms
4 drwxrwxr-x 3 media_rw media_rw 4096 Oct 12 06:03 Android
4 drwxrwxr-x 2 media_rw media_rw 4096 Oct 12 06:01 DCIM
4 drwxrwxr-x 2 media_rw media_rw 4096 Oct 12 06:01 Download
4 drwxrwxr-x 5 media_rw media_rw 4096 Oct 12 06:09 GOLauncherEX
4 drwxrwxr-x 2 media_rw media_rw 4096 Oct 12 06:01 Movies
4 drwxrwxr-x 2 media_rw media_rw 4096 Oct 12 06:01 Music
4 drwxrwxr-x 2 media_rw media_rw 4096 Oct 12 06:01 Notifications
4 drwxrwxr-x 3 media_rw media_rw 4096 Oct 12 08:55 Pictures
4 drwxrwxr-x 2 media_rw media_rw 4096 Oct 12 06:01 Ringtones
136520 -rw-rw-r-- 1 media_rw media_rw 139791302 Oct 11 23:06 cm-10-20121011.zip
85104 -rw-rw-r-- 1 media_rw media_rw 87138923 Oct 11 23:02 gapps-jb.zip
4 drwxrwxr-x 3 media_rw media_rw 4096 Oct 12 06:06 xiialive
Greetings and thanks for your time
PD: Can you mark this thread as [SOLVED] please? Thanks
Related
Hello,
I can't delete some files on my device (Samsung Galaxy Note 2 LTE [t0lte]]) running CyanogenMod 10.1 using RootExplorer (or similar file manager).
So I tried with adb (in CM10.1, ClockworkMod & TeamWin recovery), but received error messages:
Code:
/data/media/0/DCIM/.thumbnails # rm 1375815201990.jpg
rm: can't remove '1375815201990.jpg': Operation not permitted
/data/media/0/DCIM/.thumbnails # chmod 777 1375815201990.jpg
chmod: 1375815201990.jpg: Operation not permitted
/data/media/0/DCIM/.thumbnails # chown root:root 1375815201990.jpg
chown: 1375815201990.jpg: Operation not permitted
I think there is something wrong with the permissions, here are the directory listings:
Code:
/data/data/com.amazon.venezia.wech/app_resources/configurationTwo/assets/css/amazon-phoenix/compositions # ls -lisah
202883 4 drwx------ 2 u0_a145 u0_a145 4.0K Aug 14 20:03 .
202882 4 drwx------ 3 u0_a145 u0_a145 4.0K Aug 8 03:43 ..
203719 24 ---S-wxr-t 1 u0_a1355 u0_a2315 1.8G Oct 11 2024 amazon-phoenix-xlarge-landscape-xhdpi.css
Code:
/data/lost+found # ls -lisah
10333 4 --wsrwSr-x 1 u22097_a u4253_a5 12.0K Jan 27 1988 #10333
10436 4 -r-------T 1 u22097_a u12935_a 254.5M May 14 1984 #10436
104567 8 ----r-Srwx 1 u37071_a u21823_a 36.0K Mar 5 1951 #104567
104571 36 d-w-rws--T 2 u18849_a u29364_a 36.0K Jan 10 1956 #104571
104687 8 ---S--x-w- 1 u38084_a u38537_a 28.0K Feb 16 1986 #104687
104696 8 --w--wsrwT 1 u8912_a4 u20250_a 36.0K Jun 12 1929 #104696
104832 36 d---r-sr-T 2 u8902_a5 u4062_a1 36.0K Sep 23 1929 #104832
...and_many_more...
Code:
/data/media/0/DCIM/.thumbnails # ls -lisah
243488 156 drwxrwxrwx 2 media_rw media_rw 152.0K Aug 15 11:29 .
97358 4 drwxrwxrwx 3 media_rw media_rw 4.0K Aug 16 08:32 ..
248825 32 -r---ws-wx 1 all_a153 u0_a2320 712.5M Aug 19 1994 1375815201990.jpg
BTW: /data/media/0 is the internal sd-card of my device.
How can I delete theses files?
all files gone, have to rebuild my phone
Stiegi said:
How can I delete theses files?
Click to expand...
Click to collapse
I didn't find a smart way (no "xattr", or "chflags", ... on android available) to clean the files off from my disk, so I rebuild my phone:
copied all files from /data/media/0/ to my linux,
wiped all local partitions (ecxept my external sdcard) in TWRP (but the bad files are still there)
found another menu in TWRP and formated the /data/... (now the unusable files & folders are gone. I think the /data-wipe in TWRP uses "rm -fR *" on /data.)
installed the latest CM10.1 + gapps,
booted the phone,
google restored my apps,
TitaniumBackup restored the appdata,
and finally I copied the files from my linux back to /data/media/0/
So after a day of extreme backup-/restore-/delete-/copy-ing I'm back on the track
Hi all,
I'm just hacking at my rk3188 box, and trying to get XBMC to read my ext4 external hard drive.
However when the hard drive is mounted, XBMC only sees an empty directory!
Also, in the terminal, "su'ing" as an app user, the directory appears empty also.
This worked perfectly with android 4.2, 4.4 seems be more troublesome.
Code:
[email protected]_872xu:/ # ls -ailrt /mnt/usb_storage/usb/
3222 dr-xr-xr-x 3 media 1023 60 Sep 9 11:32 ..
10959 -rw-rw-rw- 1 root root 0 Sep 9 11:35 testing
8841 drwxrwxrwx 2 media root 60 Sep 9 14:18 .
[email protected]_872xu:/ # mount -t ext4 /dev/block/sda1 /mnt/usb_storage/usb
[email protected]_872xu:/ # ls -l /mnt/usb_storage/usb/backup/
-rwxrwxr-x 1 root root 2147483648 Sep 9 11:20 arch.img
drwxrwxrwx 2 root root 4096 Sep 7 17:30 init.d
[email protected]_872xu:/ # su - app_65
[email protected]_872xu:/ $ ls -l /mnt/usb_storage/usb/backup/
/mnt/usb_storage/usb/backup/: No such file or directory
1|[email protected]_872xu:/ $ ls -l /mnt/usb_storage/usb
-rw-rw-rw- root root 0 2014-09-09 11:35 testing
dmarkey said:
Hi all,
I'm just hacking at my rk3188 box, and trying to get XBMC to read my ext4 external hard drive.
However when the hard drive is mounted, XBMC only sees an empty directory!
Also, in the terminal, "su'ing" as an app user, the directory appears empty also.
This worked perfectly with android 4.2, 4.4 seems be more troublesome.
Code:
[email protected]_872xu:/ # ls -ailrt /mnt/usb_storage/usb/
3222 dr-xr-xr-x 3 media 1023 60 Sep 9 11:32 ..
10959 -rw-rw-rw- 1 root root 0 Sep 9 11:35 testing
8841 drwxrwxrwx 2 media root 60 Sep 9 14:18 .
[email protected]_872xu:/ # mount -t ext4 /dev/block/sda1 /mnt/usb_storage/usb
[email protected]_872xu:/ # ls -l /mnt/usb_storage/usb/backup/
-rwxrwxr-x 1 root root 2147483648 Sep 9 11:20 arch.img
drwxrwxrwx 2 root root 4096 Sep 7 17:30 init.d
[email protected]_872xu:/ # su - app_65
[email protected]_872xu:/ $ ls -l /mnt/usb_storage/usb/backup/
/mnt/usb_storage/usb/backup/: No such file or directory
1|[email protected]_872xu:/ $ ls -l /mnt/usb_storage/usb
-rw-rw-rw- root root 0 2014-09-09 11:35 testing
Click to expand...
Click to collapse
No ideas?
HI, I have just picked up a Venue 10 5050. It comes with Lollipop but of course like all Venue's is missing support for NTFS file system. I have Rooted, and installed the ntfs-3g found here:
HTML:
http://forum.xda-developers.com/android/development/exfat-ntfs-fuse-drivers-easy-build-t3126413
It installs fine, and I am able to mount my portable NTFS drive using the USB port as root from adb shell.
Code:
ntfs-3g -o umask=0 /dev/block/sda1 /storage/usbcard1
Of course the problem is Applications can not see the device. I believe it is because the storage mount point looks like so:
Code:
[email protected]:/ # ls -al /storage
ls -al /storage
d---r-x--- root sdcard_r 2015-09-02 14:13 emulated
lrwxrwxrwx root root 2015-09-02 14:11 sdcard0 -> /storage/emulated/legacy
drwxrwx--x root sdcard_r 1969-12-31 18:00 sdcard1
drwxrwxrwx root root 2015-08-26 06:31 usbcard1
Note the group owner for /mnt/usbcard1 is root and needs to be sdcard_r to be viewable by applications.
Anyone have an idea on how this can be fixed?
Domenic
small update, I ran the /etc/install-recovery-2.sh which mounted the drive on /mnt/media_rw/sdcard1 which I can view with an ls -al which displays:
drwxrwxrwx media_rw media_rw 2015-08-26 06:31 sdcard1
which root can view, but again non of the applications can view the data? I am certain it is some type of lollipop type issue?
Domenic
So I have installed stickmount from the Playstore. It auto mounts the NTFS drive when I plug it in.
Domenic
I've create a directory /storage/sdcard2 and mounted it as follows:
mkdir sdcard2
chmod 771 /storage/sdcard2
chgrp 1015 /storage/sdcard2
So it has looks like:
drwxrwx--x 3 root sdcard_rw 60 Feb 12 20:17 sdcard2
Now the external storage looks like:
drwxrwx--x 19 root sdcard_rw 32768 Dec 31 1969 DE52-F3E6
So they match exactly, but for some reason while most apps (non-root) can see and view /storage/DE52-F3E6 nothing but root apps can see /storage/sdcard2 (if I su* others can see it in a console but not access it). In Android (CM12) 5.1, this worked fine, in (CM13) 6.0.1 I'm going crazy. I thought it might be namespace separation in Super SU, but that does not appear to be the case it is as if there is another block that only allows root to see non-standard directories (or files) since creating a file in /storage has the exact same issue.
How do I fix this as it makes using 6.0.1 useless as I can not manually mount my secondary partition on the SD Sard and get access to the data on it (except as root).
su - u_10034
127|[email protected]:/storage # su - u0_a334
[email protected]:/storage $ ls -al
drwxr-xr-x 6 root root 140 Feb 12 20:06 .
drwxr-xr-x 28 root root 0 Feb 12 19:59 ..
drwxrwx--x 19 root sdcard_rw 32768 Dec 31 1969 DE52-F3E6
drwx--x--x 5 root sdcard_rw 4096 Dec 31 2014 emulated
drwxrwx--x 3 root sdcard_rw 60 Feb 12 20:17 sdcard2
drwxr-xr-x 2 root root 60 Aug 2 2015 self
[email protected]:/storage $
At a minimum I want to at be able to access the sdcard2 directory same as I can access DE52-F3E6 the permissions match, but the SE (ls -n) setting differ, but I can not find what setting I need to use there to allow the same access as DE52-F3E6 since DE52-F3E6 is a device and sdcard2 is a directory.
Thanks,
ERIC
First I'm on 7.1.1 LineageOS v20, I have my SD card formated using ext2 since I need 4+ GB files for TWRP backups. This works and I can create files and folder ..., however I've found that if I pull the SD card and on a computer set the permission to say 777 all is fine, but on the Phone, I can for instance create a directory using root-explorer, but can not set permission or copy files into it. If I create the folder on the computer I can copy files into it however. Next say I backup using Ti-backup to the external SDcard it works fine, but of I install a new ROm I can not access the previous backup files. I can not change the permissions on the file to 777 either from a terminal.
Really this is what upsets me, as root in a terminal I can not set permissions on a file as it does nothing, for instance on /storage/emulated/0 I have:
h918:/storage/emulated/0 # ls
drwxrwx--x 3 root sdcard_r 4096 Mar 14 19:35 .rr
-rw-rw---- 1 root sdcard_r 1369542927 Apr 1 22:28 01update.zip
-rw-rw---- 1 root sdcard_r 884357956 Apr 1 22:34 02update.zip
-rw-rw---- 1 root sdcard_r 1057588047 Apr 1 22:41 03update.zip
drwxrwx--x 2 root sdcard_r 4096 Mar 9 23:06 3DMarkAndroid
drwxrwx--x 2 root sdcard_r 4096 Mar 4 18:20 Alarms
....
as root I execute:
h918:/storage/emulated/0 # chmod 777 *.zip
h918:/storage/emulated/0 # chmod 777 *.zip
h918:/storage/emulated/0 # ls -al
drwxrwx--x 43 root sdcard_r 4096 Apr 1 22:35 .
drwx--x--x 4 root sdcard_r 4096 Jan 1 2016 ..
-rw-rw---- 1 root sdcard_r 2557 Apr 1 20:20 .bash_history
drwxrwx--x 3 root sdcard_r 4096 Mar 14 19:35 .rr
-rw-rw---- 1 root sdcard_r 1369542927 Apr 1 22:28 01update.zip
-rw-rw---- 1 root sdcard_r 884357956 Apr 1 22:34 02update.zip
-rw-rw---- 1 root sdcard_r 1057588047 Apr 1 22:41 03update.zip
drwxrwx--x 2 root sdcard_r 4096 Mar 9 23:06 3DMarkAndroid
drwxrwx--x 2 root sdcard_r 4096 Mar 4 18:20 Alarms
...
The permissions remain unchanged, why I'm root I should be able to change permissions.
looking at mount the options are:
/dev/fuse on /storage/emulated type fuse (rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other)
/dev/fuse on /mnt/runtime/read/emulated type fuse (rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other)
/dev/fuse on /mnt/runtime/write/emulated type fuse (rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other)
The SD card looks similar:
/dev/fuse on /storage/ea8c26be-fcbc-4773-b799-5e64ef33f641 type fuse (rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other)
/dev/fuse on /mnt/runtime/read/ea8c26be-fcbc-4773-b799-5e64ef33f641 type fuse (rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other)
/dev/fuse on /mnt/runtime/write/ea8c26be-fcbc-4773-b799-5e64ef33f641 type fuse (rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other)
Nothing here should block ROOT from change the permissions. I simply want as root or as any root application to be able to create a directory change file permission and access data written as another root app, all of which make it possible to use the phone and backup/restore safely.
I can only assume something is blocking me form using the device the way I want and operating on files, since pulling the card to a computer allows setting 777 and then it works as I want, what I want is to set the umask to 777 for everything, as for security that can be damned as I need to be able to backup and restore safely first, something I can not do now as Tibackup can not access it's own files on restore unless I first pull the card and set the permissions on a computer, which is unacceptable.
Files created on the phone have permissions 700 or something similar, even though on the phone they are listed as having more, this explains the issue as it is not for instance: -rw-rw---- but -rw-------, however root should still be able to access the file and can not, nor can root change the settings.
ERIC