I executed this to check to see if I have write permissions on a folder and it fails (returns -1). I am a system admin and SQL admin. I have full access to this directory but the R Script says I do not. If I change the mode of the script to check for read or execute permissions, it succeeds (returns 0). What else can I check to fix this?
EXECUTE sp_execute_external_script @language = N'R' ,@script = N'OutputDataSet <- data.frame(file.access("C:/Program Files/Microsoft SQL Server/MSSQL13.MSSQLSERVER/R_SERVICES/library/", 2));' WITH RESULT SETS (([DefaultLibraryName] VARCHAR(MAX) NOT NULL)); GO