[R] file.access returning -1 for a file on remote Windows drive.

Sam Albers ton|ght@then|ght @end|ng |rom gm@||@com
Fri Feb 28 19:47:13 CET 2020


Hi there,

Looking for some help in diagnosing or developing a work around to a
problem I am having on a Windows machine. I am running R 3.6.2.

I have two identical files, one stored locally and the other stored on
a network drive.

For access:

> file.access(local_file, 4)
local.R
         0

> file.access(remote_file, 4)
remote.R
            -1

Also for file.info

> file.info(local_file)$mode:
[1] "666"

> file.info(remote_file)$mode:
[1] "666"

Ok so I am access issues. Maybe they are ephemeral and I can change
the permissions:

> Sys.chmod('remote.R', mode = '666')
> file.access(remote_file, 4)
remote.R
            -1

Nope. I am thoroughly stumped and maybe can't make it any further
because of Windows.

Downstream I am trying to use digest::digest to create a hash but
digest thinks we don't have permission because file.access is failing.
Any thoughts on how I can get file.access to return 0 for the remote.R
file? Any ideas?

Thanks in advance,

Sam



More information about the R-help mailing list