Loading...
Searching...
No Matches
writecheck.sas File Reference

Answers whether a folder exists and is writeable. More...

Go to the source code of this file.

Detailed Description

It creates and removes a probe file in the folder, which is what the deployment itself will do. The probe name carries the process id and a random number and an existing file is never reused - fopen with 'O' truncates.

The path arrives in the adapter table and is read back with symget, so its characters are data: a value over 1000 characters, one carrying a control character, or one that is not an absolute path is refused, and the shape is then checked with mp_validatecol(ISPATH).

Access is whatever the platform grants on the admin folder: the deploy screen calls it before the app is configured, so the service itself carries no gate.

Data Inputs

fromjs
PATH:$1000.
/tmp

Data Outputs

checkwrite
PATH:$1000. PATH_EXISTS:$1. IS_FOLDER:$1. WRITEABLE:$1. MSG:$200. SYSUSERID:$32.
/tmp Y Y Y sasdemo

SYSUSERID is the account the probe was made as (&sysuserid), so a writeable answer names who can write rather than only that somebody can.

SAS Macros

Version
9.3
Author
4GL Apps Ltd

@sasjslint {"maxLineLength": 84}

Definition in file writecheck.sas.