Solvedazure cli [CloudShell] Error on every command run on Azure Cloud Shell: OSError: [Errno 30] Read-only file system

This is autogenerated. Please review and update as needed.

Describe the bug

When I go to run any command on the system it errors out and prevents me from using the cloud shell interface.

Command Name
Any command at all


The command failed with an unexpected error. Here is the traceback:

[Errno 30] Read-only file system: '/home/**Redacted Username**/.azure/commands/2020-06-05.22-24-38.unknown_command.211.log'
Traceback (most recent call last):
  File "/opt/az/lib/python3.6/site-packages/knack/", line 215, in invoke
    cmd_result = self.invocation.execute(args)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/", line 511, in execute
    load_cmd_tbl_func=self.commands_loader.load_command_table, args=args)
  File "/opt/az/lib/python3.6/site-packages/knack/", line 164, in raise_event
    func(self, **kwargs)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/", line 86, in init_command_file_logging
    self._init_command_logfile_handlers(cmd_logger, args)  # pylint: disable=protected-access
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/", line 108, in _init_command_logfile_handlers
    logfile_handler = logging.FileHandler(log_file_path)
  File "/opt/az/lib/python3.6/logging/", line 1032, in __init__
    StreamHandler.__init__(self, self._open())
  File "/opt/az/lib/python3.6/logging/", line 1061, in _open
    return open(self.baseFilename, self.mode, encoding=self.encoding)
OSError: [Errno 30] Read-only file system: '/home/**Redacted Username**/.azure/commands/2020-06-05.22-24-38.unknown_command.211.log'

To Reproduce:

Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

  • I don't know how to reproduce the errors. I just get the error every time I put in a command.

Expected Behavior

I expected all the commands to not error out on run.

Environment Summary

Cloud Shell

Additional Context

30 Answers

✔️Accepted Answer

Yes, I can reproduce the problem and a fix/workaround:
1/ Delete the group "cloud-shell-storage-westeurope" in which the "Storage account" for the Cloud Shell has been created.
2/ Wait for the deletion.
3/ Go back to Cloud Shell and click "Create storage".
4/ See the issue by typing (for instance):

$ echo "hello world" > ~/test.txt
bash: /home/benoit/test.txt: Read-only file system

5/ Restart Cloud Shell with the "power" button/icon.
6/ Check that the issue is fixed by typing (for instance):

$ echo "hello world" > ~/test.txt

Hope this help.

Related Issues:

azure cli az aks list - No module named '_cffi_backend'
Same here Update: python3 -m pip install cffi fixed it for me. Command Ran: az aks list Fixed issue ...
azure cli zsh autocompletion on OSX/macOS
I also just encountered this Every time I launch my terminal I get the following error: /Users/blake...
azure cli 'az aks browse' doesn't work. Error listening on port 8001
Found a workaround Describe the bug This command used to work for me but not recently even after I r...
azure cli az ad app permission grant not working or usable as expected
az ad app permission admin-consent is the old way of granting all Application Permissions and Delega...
azure cli unable to update cli using homebrew
I ran brew reinstall python3 to fix this I tried to install the latest CLI from the docs: https://do...
azure cli DLL load failed while importing win32file: The specified module could not be found.
I was able to solve it by reinstalling pywin32 with a terminal Run as Administrator: Though the root...
azure cli az container create fails with AttributeError: 'ResourcesOperations' object has no attribute 'create_or_update'
Ubuntu hosted agents were updated to azure-cli 2.24.0 today Describe the bug Command Name az contain...
sops Cannot decrypt with GPG 2.2.5 and SOPS 3.0.0
The problem suddenly re-occured.. I think it has to do with the gpg-agent For the moment this solved...
azure quickstart templates resourceId() support for multi-segment sub-resources?
I think I figured this out: funny how none of the quick-start examples do this ...
terraform provider azurerm key vault soft-delete causing failure when updating secrets or certificates
I'm seeing exactly the same issue key vault soft-delete causing failure when updating secrets and ce...
azure powershell 'az account get-access-token' equivalent in Azure PowerShell
Get-AzAccessToken is available in Az.Accounts 2.2.0 which will be released on Nov 17 please have a t...
terraform provider azurerm Azurerm_frontdoor with v2.24.0 breaks when azure frontdoor is edited in portal.
Same issue here but on another level: Error: flattening frontend_endpoint: ID was missing the frontD...
acs engine Pods are uanble to resolve DNS for any of Azure service or other external sites.
Here is a quick status update: There are two problems happening concurrently Is this a request for h...
terraform provider azurerm r/application_insights: support for the Workspace model
Until this is supported natively by terraform This issue was originally opened by @klainn as hashico...
azuredatastudio Connecting to remote SQL Server from Ubuntu 20.04
hello i am so happy to tell you that i have a solution i tested and works perfectly is a downgrade o...
pulumi Resource Adoption
I have a workaround until this feature is shipped While pondering #1654 ...
azure sdk for net ClientServerCredential equivalent for simple apiKey authentication?
Here is my version of the ServiceClientCredentials for apiKey Is there support for swagger's concept...
terraform provider azurerm TF apply/plan have different constraints for "Consumption" tier for API Management
Looks like there's a bit more to this than just the capacity tier of zero Community Note Please vote...
terraform provider azurerm multi-tenant deployment using Azure shared image gallery via terraform
@nicethomaslearngit I was having the same issue as you and seem to have figured it out ...
terraform provider azurerm Failed to destroy azurerm_key_vault and associated azurerm_key_vault_access_policy (30 minute timeout)
@katbyte given that you've just updated the for the v2.50.0 release (b74f30f) and there...
terraform provider azurerm conflict between azurerm_subnet_route_table_association and azurerm_subnet route_table_id
hey @steve-hawkins As a workaround I use a lifecycle in azurerm_subnet : I don't know if this is the...
terraform provider azurerm Terraform loses access token and requires az login
At least update the error message from terraform to include the workaround using az account get-acce...
spark [BUG]: Trying to follow the "Getting Started" guide step by step
One temporary work-around to avoid seeing the spark temporary files error is to add the following tw...
acs engine The cluster-internal DNS server cannot be used from Windows containers
The DNS issue does not seem unique to Windows (#2999 #2880) as of a few days ago ...
azure sdk for net [BUG] Enabling VisualStudioCodeCredential on macOS crashes dotnet
Why is this bug closed? This workaround breaks on Windows it feels a bit crispy to add this to every...
caprover 502 Bad Gateway error with REST API
If you can reproduce the issue with an open source project I can look into it Hello! I really enjoy ...
terraform provider azurerm v1.0.0 checksum mismatch error
Hey @aoggz Thanks for opening this issue - apologies about this This was due to a re-release ...
pulumi Python Outputs to string do not work as documented
Thanks for the clarifications and feedback I agree we can definitely work toward making the document...
pulumi Grpc.Core.RpcException: "Failed to deserialize response message." when using "cert-manager.crds.yaml" for ConfigFile
Here is the draft of the forking plan: Fork protocolbuffers/protobuf to Pulumi org (done): https://g...
aws cli Invalid Syntax Error when running any AWS command.
Leaving this here in case someone comes across this via google like me: I had the same issue with th...
passenger passenger-install-apache2-module fails with OpenSSL development headers not found on OSX El Capitan
After upgrading to El Capitan I'm unable to install the Apache module by running passenger-install-a...
aws cli aws s3api create-bucket throws error for us-east-2
For those of you looking to create a bucket via the CLI run this: aws s3api create-bucket --bucket d...
aws cli aws ssm put-parameter performs an HTTP GET request when the value param is an url
Just kill this 'feature' seriously Even apart from security concerns it certainly violates the princ...
terraform Ability to zip AWS Lambda function on the fly
For anyone else who finds this issue I found a good solution to this using the archive_file data sou...
terraform Feature request: Allow using lists and maps with conditionals
BTW I did find one workaround: I'm using join to turn the lists into strings to get past the type ch...
aws cli How to describe instances from all regions?
For people arriving here from Google here's one way to list all your instances across all regions wi...
terraform for_each attribute for creating multiple resources based on a map
Hi @mirogta! Thanks for this feature request and your detailed use-case This is definitely a request...
terraform "Warning: Value for undeclared variable"
I wrote about my objections to this feature in #19424 (comment) but that issue was locked ...
che event-stream-3.3.6.tgz not found in Yarnpkg.
this is due to : to...
generator jhipster Uncaught Error: Module build failed: Error: ENOENT: no such file or directory, scandir '**\node_modules\node-sass\vendor'
@lancurtis run npm rebuild node-sass Hi There was an error occured in my chrome on windows 10 x64 wh...
server Upgrade fails with - Column name "oc_flow_operations.entity" is "NotNull", but has empty string or null as default
I just got this error while upgrading from 17.0.10 to 18.0.10 Also with me the column entity did not...
terraform Allow aws_acm_certificate to lookup certificates in different region
Hi @kifbv! Currently the answer to doing anything in multiple regions is to instantiate the aws prov...
terraform Improving perception of changes when showing diff
Hi all! Sorry for the long silence here When I make a change to a large list of values (for example)...
aws cli Can't install / configure aws cli
Interesting It looks like it's failing to parse ~/.aws/config Can you try putting in fake values? He...
terraform Enable support for Google Cloud SQL Postgres
Haha I just figured out that the custom tier actually encodes the amount of CPU and memory The first...
aws cli Code Deploy - Unhandled exception - ZIP does not support timestamps before 1980
eb deploy gave me find -mtime +10950 -print -exec touch {} \; solved the problem. ...
aws cli PyYAML requires python-dev dependency
We have had some success here by running Hi It seems the latest release of awscli requires PyYAML as...
terraform How do i add tag variables to aws_autoscaling_group resource?
to convert regular tags map to asg tags map (sorry forgot who I stole this snippet from!) ...
terraform "Referencing Attributes from Resources with count = 0" change in Terraform 0.11 should be a warning!
@danhart The workaround is to use this ugly idiom: Finding all the places where this needs to be fix...