Page 1 of 2

Error copying file to /system partition

Posted: 2013-12-06, 11:15 UTC
by revanmj
Anytime I want to copy some file to the /system partition I get an error saying "su error: could not open source file". Other file managers (for example ES File Manager) don't have this issue.

I'm running an unofficial build of CyanogenMod 11 (Android 4.4) on a Galaxy Nexus and using its default Superuser app.

Posted: 2013-12-06, 16:23 UTC
by ghisler(Author)
I'm surprised that ES can do it under these conditions - to my knowledge, "Superuser" is NOT supporting Android 4.3 and 4.4 yet.

Total Commander currently works with SuperSU. I have no idea what I need to change to make it work with Superuser. I simply call the "su" binary, and SuperSU does the rest.

If anyone has an idea what could be done, please let me know.

Posted: 2013-12-07, 11:14 UTC
by spamkuba
Hi, I love you program but I have problem too. I use stock 4.4 with supersu. When I copy file from sd to /system file I loose icons and file is not working.
It's a problem with permission?

Posted: 2013-12-08, 11:13 UTC
by ghisler(Author)
2revanmj
Which build of Cyanogenmod 11 do you use? I have just installed Cyanogenmod 11 "M Snapshot" dated 2013-12-05 on my Nexus 7 (2012), and I can mount partitions as read/write without any problems. I can also copy to /system without problems. Please make sure that you use the latest Total Commander from the Play Store or ghisler.com.

2spamkuba
This is normal - when you copy a file to /system, it inherits the user rights of that folder. Therefore it's probably limited to root now. To view and change the permissions and user/group, please make a long tap on the file and choose "Properties". There you can tap on "rwx" for the permissions, or "UID" for user/group name.

Posted: 2013-12-09, 20:24 UTC
by spamkuba
both files have RWX: -rw-r--r-- and UID:0 root
I can send screenshot how it looks

Posted: 2013-12-10, 16:38 UTC
by ghisler(Author)
This means that the file should be readable by everyone, but cannot be changed except by the root user.

Posted: 2013-12-22, 16:38 UTC
by ghisler(Author)
This is a bug of Cyanogenmod 11! While the user has access to /storage/emulated/0, the root user does NOT have access to it!

Beta 2 therefore redirects to /storage/emulated/legacy if it cannot access /storage/emulated/0.

Please try it!

Posted: 2013-12-23, 14:59 UTC
by siealex
It's a bug of Android 4.3 and 4.4, not only cyan.

Posted: 2013-12-24, 13:35 UTC
by ghisler(Author)
No it's not. I have a Nexus 7 (2012) with the official 4.4 release from Google, and it does NOT have this bug - the root user does have read and write access to /storage/emulated/0

Posted: 2018-04-03, 15:00 UTC
by Hurdet
Also i have this problem.
"could not open source file error:2"
4.4.2
do it have a solution.
changed rw /system and file.
remount rw.

Posted: 2018-04-05, 10:19 UTC
by ghisler(Author)
Sorry, I don't understand. Please be more specific of what doesn't work. What are you trying to do in /system ?

Posted: 2018-04-05, 11:09 UTC
by Hurdet
I get this error when try to edit or overwrite /etc/dhcpcd/dhcpcd-hooks/20-dns.conf

Posted: 2018-04-09, 14:19 UTC
by ghisler(Author)
I see. You may not have the rights to read or write the file, or write to the folder. Please try setting the file attributes via properties.

Posted: 2018-04-09, 14:21 UTC
by Hurdet
I have set up all permission enabled.

Posted: 2018-04-09, 14:23 UTC
by ghisler(Author)
From where do you try to copy to /system?