Move file: Operation not permitted

iwally

Member
Hello everybody,
basically I am trying to rename a file_random.mp3 to file_fixedname.mp3 In my own dir /storage/emulated/0/_MyDir/

I have tried with Shell script action mv /storage/emulated/0/_MyDir/file_random.mp3 /storage/emulated/0/_MyDir/file_fixedname.mp3 but no matter the “Use Helper App” option I can’t get the file renamed.
Either it goes in timeout (with flag) or it says “Operation not permitted”

Must add I’m not rooted but with ADB hack

Is it the dir itself? Or what else?
I found nothing helpful to solve the issue
Thanks for support
 

Dimlos

Well-known member
It works fine in my environment.
Please try the sample macro attached.
 

Attachments

  • MV_Command_Test.macro
    1.5 KB · Views: 10

LinerSeven

Active member
Hi, iwally.

I'm wondering if you have given MD Helper permission to manipulate files.
Could you please confirm that?

If the authorisation is granted to helper app, it can do so without a time-out, as @Dimlos says.

Screenshot_20230925-163653.png

Reguards,

Liner Seven
Thanks for reply.
Timed out, in my envionment
 
Last edited:

iwally

Member
Hi, iwally.

I'm wondering if you have given MD Helper permission to manipulate files.
Could you please confirm that?

If the authorisation is granted to helper app, it can do so without a time-out, as @Dimlos says.

View attachment 6879

Reguards,

Liner Seven

Hello LinerSeven,
I think I gave the proper authorization if you mean this.
Thanks
 

Attachments

  • Screenshot_20230925_122041_Permission controller.jpg
    Screenshot_20230925_122041_Permission controller.jpg
    166 KB · Views: 10

Dimlos

Well-known member
I see that the shell command works.
Why it doesn't work when you actually type the command is a mystery.
 

LinerSeven

Active member
Hi @iwally,

It's not easy to solve this problem well... X-(

Could you please tell us what is returned in the variable 'LocalShell' when you run the attached macro?

Regards,
LinerSeven
 

Attachments

  • Z_Test.macro
    1.7 KB · Views: 3

iwally

Member
Hi @iwally,

It's not easy to solve this problem well... X-(

Could you please tell us what is returned in the variable 'LocalShell' when you run the attached macro?

Regards,
LinerSeven
Hello LinerSeven,
I know, it's not eas and I really appreciate your help!

In the macro you sent I just chaged the name of file_random.mp3 to "_random.mp3" (just because it was already there)
I find a Local Variable named ShellResult, which:

A. remains <empty>, log is Screen_1
B. becomes "mv.bad '_random.mp3' Operation not permitted" if I remove the "User Helper App" flag, and log is Screen_2

Many thanks
 

Attachments

  • Screen_1.jpg
    Screen_1.jpg
    87.1 KB · Views: 6
  • Screen_2.jpg
    Screen_2.jpg
    161.5 KB · Views: 5

iwally

Member
I would like to see the full text of the timeout error.
Can you provide a screenshot?
Thanks Again Dimlos.
These are the screenshots with time out

The first is the shell action
The second is the execution log

Let me know if you meant other with "full text"
The shell script vatiable remains empty in this case.
Thanks again
 

Attachments

  • Screenshot_20230925_160821_MacroDroid.jpg
    Screenshot_20230925_160821_MacroDroid.jpg
    379.5 KB · Views: 7
  • Screenshot_20230925_160908_MacroDroid.jpg
    Screenshot_20230925_160908_MacroDroid.jpg
    256.8 KB · Views: 7

iwally

Member
@iwally
Try changing the mp3 you are using for testing to jpg and run the script.
Please prepare a new jpg using screenshots, etc.
In my opinion nothing has changed.
In the attached print screen you can read both tentatives: without and with the "Use Helper App".

Thanks
 

Attachments

  • Screenshot_20230925_210638_MacroDroid.jpg
    Screenshot_20230925_210638_MacroDroid.jpg
    407.3 KB · Views: 4

Dimlos

Well-known member
@iwally
Could you try to execute this macro?
Please select the items and execute them one by one with Test action instead of executing them all at once.
The first script creates the before directory and the next script renames it to after.
 

Attachments

  • Macro.jpg
    Macro.jpg
    385.6 KB · Views: 3
  • MV_Command_Test_2.macro
    2 KB · Views: 4

LinerSeven

Active member
Hi. @iwally,

Thank you....

Looking at the screenshot you provided, the mv command is working, but the answer is that the target folder side /storage/emulated/0/_MyDir/ does not have permissions.

From this result, we can infer that _MyDir may be recognised as a system folder.

@Dimlos suggests placing it in a different folder, could you try that?

Regards,

Liner Seven
 
Top