question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Permissions problem trying to create a sink

See original GitHub issue

While working on a system test for Sink.create, I’m running into a permissions problem:

>>> sink.create()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "gcloud/logging/sink.py", line 145, in create
    client.connection.api_request(method='PUT', path=self.path, data=data)
  File "gcloud/connection.py", line 343, in api_request
    error_info=method + ' ' + url)
gcloud.exceptions.Forbidden: 403 The caller does not have permission (PUT https://logging.googleapis.com/v2beta1/projects/citric-celerity-697/sinks/test-sink)

Sinks.create is documented to require one of https://www.googleapis.com/auth/logging.admin or https://www.googleapis.com/auth/cloud-platform.

My client is set up with all permissions for the logging API:

>>> client.connection._credentials._scopes
'https://www.googleapis.com/auth/logging.read https://www.googleapis.com/auth/logging.write https://www.googleapis.com/auth/logging.admin https://www.googleapis.com/auth/cloud-platform'

Do I have to do something in the developer control panel to enable sinks?

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:25 (22 by maintainers)

github_iconTop GitHub Comments

1reaction
quartzmocommented, Mar 17, 2016

@tseaver Adding cloud-logs@google.com as Bucket ACL owner lets us successfully create the Sink in gcloud-ruby. I am closing our similar issue with the documentation PR referenced above.

0reactions
dhermescommented, Mar 18, 2016

OK. I can make the changes. Send me an email with the changes you want?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshoot routing and sinks - Logging - Google Cloud
If a sink tries to route a log entry but lacks the appropriate IAM permissions for the sink's destination, the sink reports an...
Read more >
GCP: Unable to create Project Sink through gcloud/API
As per the official documentation, the specific permission needed for creating projects sinks is logging.sinks.create which is included in both ...
Read more >
One Drive Sends Message: No access permissions to the Item ...
Access errors and Admin issues are common in Windows 10 and almost always mean a corrupted account. 1) Try these fixes for the...
Read more >
"Caught exception while emitting to sink" error
Create the Logs folder manually. Give the user account under which the Advance application pool runs the appropriate permissions to write to the...
Read more >
Create file in folder: permission denied - Unix Stack Exchange
You can either change the permission of the directory and enable others to create files inside. sudo chmod -R 777 /home/sixven/camp_sms/inputs.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found