Bug: Can't edit file in symbol link folder

Support for Android version of Total Commander

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
dindog
Senior Member
Senior Member
Posts: 315
Joined: 2010-10-18, 07:41 UTC

Bug: Can't edit file in symbol link folder

Post by *dindog »

My kernel has a Color Control feature, and its setting is saved in
/sys/class/misc/colorcontrol/v1_offset

v1_offset is the filename, and colorcontrol is a symbol link folder.

there are two issue:

1. the file size is incorrect. In this case, it is a few byte file, but it show as 4k anyway.

2. long-press then select Edit File, it will prompt error, saying:

Code: Select all

error reading file!
/sys/class/misc/colorcontrol/v1_offset
It is not necessary related to the symbol link, but this is a obvious suspect...
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Please check in context menu - properties of the file whether you have the read rights for this file (for all types, owner, group, other).
Author of Total Commander
https://www.ghisler.com
User avatar
dindog
Senior Member
Senior Member
Posts: 315
Joined: 2010-10-18, 07:41 UTC

Post by *dindog »

ghisler(Author) wrote:Please check in context menu - properties of the file whether you have the read rights for this file (for all types, owner, group, other).
of course,
BTW, I can use "echo" command to set the feature, as well as other text editor.

Only TC fail to open it
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Did you run "echo" with root rights (su command)? The editor does NOT root rights, it can only edit the file if you give everyone access to the file.
Author of Total Commander
https://www.ghisler.com
User avatar
dindog
Senior Member
Senior Member
Posts: 315
Joined: 2010-10-18, 07:41 UTC

Post by *dindog »

ghisler(Author) wrote:Did you run "echo" with root rights (su command)? The editor does NOT root rights, it can only edit the file if you give everyone access to the file.
yes, echo with root right. But this doesn't explain everythings:

1. I've checked ALL checkbox in the file properties, so I think this is for everyone access ( other text editor open it normally as mentioned )

2. TC can open and edit file in other root-needed access folder files

3. doesn't explain why the file size is incorrect.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Maybe you changed the rights of the link? This doesn't give you the right to read the data from the actual file.
Author of Total Commander
https://www.ghisler.com
User avatar
dindog
Senior Member
Senior Member
Posts: 315
Joined: 2010-10-18, 07:41 UTC

Post by *dindog »

The problem should not relate to symbol link, go the the actual directory and try opening the file, issue remain.

if it's about access right, that doesn't explain why other plain text editor can open and save as normal after granted the root right when prompt.

And TC behave strange in those folder too, can't mount as RW, saying

Code: Select all

Device or resource busy!
Note: other application can access those file at the same time, so it's not true about "resource busy"

P.S.
personally, I don't think it is necessary to mark out symbol link by default, that make the layout a little chaos in some case...

and finally, a feature request:
would you consider making the highlighted toolbar always show at top? it's annoying sometime when scroll up and down in folder with many file, like /sdcard/

back & forward are also nice to have

Image: http://i.imgur.com/Gk3DQ.png
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

that doesn't explain why other plain text editor can open and save as normal after granted the root right when prompt.
Because Totalcmd's editor is NOT a root editor, it can only edit files to which you have read and write rights as a normal user.
Author of Total Commander
https://www.ghisler.com
User avatar
dindog
Senior Member
Senior Member
Posts: 315
Joined: 2010-10-18, 07:41 UTC

Post by *dindog »

ghisler(Author) wrote:
that doesn't explain why other plain text editor can open and save as normal after granted the root right when prompt.
Because Totalcmd's editor is NOT a root editor, it can only edit files to which you have read and write rights as a normal user.
chmod 777 to the folder & the file, nothing changes. It doesn't match "resource busy" error message when trying remount the folder if it's a permissions issue as well.

And just check another file, in
/system/etc/init.d/

permission setting: -rwx -rx -rx, TC built-in editor open / edit it normally
Post Reply