0

I have simple script with mv, sed, cut, awk, and redirections. It works great on my Local Ubuntu. I'm trying now to use it on a Storage Account using Azure Cloud Shell.

I know I don't have any root permission on this VM, I can't do sudo for example. But why can't I use simple mv sed cut awk with >,2> or >>?

I tried doing a simple sed command piped with a >: sed s/a/b file.txt > file2.txt And... it works. But in the script it won't, here is a list of errors I get:

sed: preserving permissions for ‘./sedFUMPCT’: Operation not permitted
mv: replace 'file.txt', overriding mode 0555 (r-xr-xr-x)?
./Main.sh: line 10: file.txt: Permission denied

I think when i run a script like this ./Main.sh it gives me a new process, so I tried . ./Main.sh. Same result.

Here are the permissions on Main.sh

-rwxrwxrwx 1 root root 31146 Sep 21 15:53 Main.sh

Why isn't working?

BeGreen
  • 765
  • 1
  • 13
  • 39

0 Answers0