gcobb321 / icloud3_v3

iCloud3 v3, Development Version - This Repo/Version is used for development and testing of new and updated features. It is not the official release of iCloud3 v3, .
MIT License
169 stars 13 forks source link

Permission denied: /.homeassistant/.storage/icloud3.apple_acct/ #370

Open buds opened 1 week ago

buds commented 1 week ago

Running latest HA core and latest icloud3 via HACS.

The icloud3.apple_acct folder has incorrect permissions when created (d--------x)

Traceback (most recent call last): File "/home/homeassistant/.homeassistant/custom_components/icloud3/helpers/file_io.py", line 86, in save_json_file json_helpers.save_json(filename, data) File "/srv/homeassistant/lib/python3.12/site-packages/homeassistant/helpers/json.py", line 224, in save_json method(filename, json_data, private, mode=mode) File "/srv/homeassistant/lib/python3.12/site-packages/homeassistant/util/file.py", line 66, in write_utf8_file raise WriteError(error) from error homeassistant.util.file.WriteError: [Errno 13] Permission denied: >'/home/homeassistant/.homeassistant/.storage/icloud3.apple_acct/tmpbsbvyijk'

Strangely the icloud3 folder DID have correct permission so I was able to log onto apple server fine but no devices were ever found because the icloud3.apple_acct folder had wrong permissions. I fixed using chmod 755 on icloud3.apple_acct Once fixed I setup again and this time I was asked to enter apple verification code then devices were listed correctly. FYI

gcobb321 commented 1 week ago

When Python creates a directory or file, the permissions are 777. Do you know what it was before you changed it to 755?