Sharing Pin on a Shared Network Drive

Hi Curtis - experimenting with {pins} on a server.
I can create a "board_shared" object with board_folder() in a folder that has sharing with others.
I can see the board_shared, but others currently can't.
I can pin_write or pin_read on the board, but others currently can't.
Oddly enough, if I go to the folder, and do fs::dir_ls() or

to the Terminal and ls the folder,
I don't see any evidence of the "board_shared" or the pinned data.

Does that seem odd?
Or is that the expected behavior?
Do I need to explicitly give other people access to the board, or just tell them the name, as long as it is in a shared folder?
It seems that I am doing something wrong, as everything is working except for the sharing part.

Details:

pin_exists(board_shared, "psych")
[1] TRUE
pin_meta(board_shared, "psych")
List of 11
file : chr "psych.rds" file_size : 'fs_bytes' int 64.8K
pin_hash : chr "37aad66676c7d038" type : chr "rds"
title : chr "psych: a pinned 7113 x 9 data frame" description: NULL
created : POSIXct[1:1], format: "2022-02-07 18:06:00" api_version: num 1
user : list() name : chr "psych"
local :List of 3 .. dir : 'fs_path' chr "nfs/isilon/path-ibdx/R-data/psych/20220207T230614Z-37aad"
.. url : NULL .. version: chr "20220207T230614Z-37aad"

Peter

Where is the pin being shared? Is it via RStudio Connect, or a dropbox folder, or something else?

You having access to it, while others don't, sounds like an authentication issue.

For example, sharing on Connect, there's a permissions pane ("Access" I think) to control who can access that pin. For dropbox, you need to make sure the shared file or directory is publicly accessible.

Hi @EconomiCurtis - thanks for the feedback.

I am using board_folder() to create a board in a shared folder on a server behind a firewall (for Protected Health Information reasons). The server folder has shared access with a limited number of people, and if I manually write a csv file to this folder, other users can see it and read it.

I can run fs::dir_ls() or terminal ls to see the csv file.
Seems fine.

I have created board_shared in this shared folder.
I have pinned the 'psych' dataset to this board.
If I run

pins::pin_list(board_shared)
[1] "psych"

I get psych back, which is correct.

If I run

pins::pin_meta(board_shared, 'psych')

I get a List of 11, which makes sense.
file : chr "psych.rds" file_size : 'fs_bytes' int 64.8K
pin_hash : chr "37aad66676c7d038" type : chr "rds"
title : chr "psych: a pinned 7113 x 9 data frame" description: NULL
created : POSIXct[1:1], format: "2022-02-07 18:06:00" api_version: num 1
user : list() name : chr "psych"
local :List of 3 .. dir : 'fs_path' chr "nfs/isilon/path-ibdx/R-data/psych/20220207T230614Z-37aad"
.. url : NULL .. version: chr "20220207T230614Z-37aad"

When I run

pin_read(board_shared, 'psych')
I get an appropriate tibble: 7,113 × 9

...1  CPI_NUM FIRST_NAME LAST_NAME BIRTHDATE PSL_DX_DESC        VISIT_DATE APPT_ACT_CANCEL… PROVIDER_LAST_N…


etc., etc.

The limited number of folks who have access and share the folder can see the csv file,
but can not see nor read the pinned data.
They can't even see the board_shared.

And, oddly enough, if I run

fs::dir_ls() in this folder, I only see the csv I placed in the folder, not the board or the pinned data.

Same thing for ls in the Terminal

Any ideas? Am I expecting something unrealistic?
I thought that this would be visible/shareable with other people who can read and write to this shared folder.
Or is this dependent on RSConnect?

This is on a server running the public (free) version of RStudio Server.

thanks,
Peter

The only shared network drive I have to test this out on is via dropbox, so my environment may not match yours sufficiently to reproduce the issue you and your colleagues are running into.

In the shared directory, are you colleagues able to see the "psych" directory created by the pin?

As a toy example, I created a shared a pin on a dropbox directory that I can access from a different machine.

library(pins)

board <- board_folder(path = "Dropbox/temp/", versioned = FALSE)

tidy_data <- data.frame(
  c1 = 1:4,
  c2 = LETTERS[1:4]
)
board %>% pin_write(tidy_data, "data-summary", type = "rds")
#> Creating new version '20220210T165606Z-3fc82'
#> Writing to pin 'data-summary'

pins::pin_list(board)
#> [1] "data-summary"
pins::pin_meta(board, 'data-summary')
#> List of 11
#>  $ file       : chr "data-summary.rds"
#>  $ file_size  : 'fs_bytes' int 132
#>  $ pin_hash   : chr "3fc82a2a812bb797"
#>  $ type       : chr "rds"
#>  $ title      : chr "data-summary: a pinned 4 x 2 data frame"
#>  $ description: NULL
#>  $ created    : POSIXct[1:1], format: "2022-02-10 08:56:00"
#>  $ api_version: num 1
#>  $ user       : list()
#>  $ name       : chr "data-summary"
#>  $ local      :List of 3
#>   ..$ dir    : 'fs_path' chr "Dropbox/temp/data-summary/20220210T165606Z-3fc82"
#>   ..$ url    : NULL
#>   ..$ version: chr "20220210T165606Z-3fc82"
pin_read(board, 'data-summary')
#>   c1 c2
#> 1  1  A
#> 2  2  B
#> 3  3  C
#> 4  4  D

Created on 2022-02-10 by the reprex package (v2.0.0)

That Pin creates the following in the Dropbox directory
image

On my other machine, I am able to see this "data-summary" directory, and access it via board <- board_folder(path = "{path to Dropbox/temp on the 2nd machine}")

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.