att / rcloud

Collaborative data analysis and visualization
http://rcloud.social
MIT License
430 stars 142 forks source link

shared.R report permissions problems? #2661

Closed gordonwoodhull closed 4 years ago

gordonwoodhull commented 5 years ago

This continues the discussion in https://github.com/att/rcloud.htmlwidgets/pull/27

@s-u suggested that we diagnose permissions problems when processing the dependencies in rcloud.htmlwidgets.

Wouldn't it be better to improve the error reporting in shared.R? I don't think it would be a security hole for shared.R to report that it couldn't access a file because of permissions.

In the case of user libraries you have to add a+rx to every parent directory all the way up through your RCloud home. It's difficult not knowing whether the path was bad or if the permissions failed.

The best way to diagnose such problems is to watch the Network tab. We already get nice 404s - if those included a little more detail and/or a different error code, then we could distinguish if it's a bug in the code or permissions problem.

s-u commented 5 years ago

I agree that it may be helpful, but it may not be trivial - the lookup sequence may be affected by the permissions (skipping over unreadable paths), so it's easy to check which works, but if it doesn't work it takes some forensics to figure out which of the candidates may have worked. Maybe what we can do is to check if a request for a specific user's library fails. I'll have a look.

gordonwoodhull commented 5 years ago

I see, yes we try multiple paths so there are potentially multiple errors.

When I was hacking on shared.R I found it helpful to report all the paths tried. Not sure if that would help users much.

Maybe it would make more sense to implement this on the rcloud.htmlwidgets side since we know which path was intended.

It's kind of a shame that shared.R evolved this way.

gordonwoodhull commented 4 years ago

Agree, this is probably too hard. Too bad.