Rules for creating files with a file open operation

An open request for a file that does not exist is essentially a file-create operation, and must be handled differently than for a file that already exists. The same location constraints that apply to an existing file being opened for write access apply to a newly created file: if the newly created file is to be in either the $SYBASE directory structure or is not contained in a configured working directory, the request fails. In addition, the access mask for the directory must allow the user ID associated with the server process to write to the target directory.

NoteWrite access, including file creation, is always allowed in the /tmp directory.

On UNIX platforms – files created with an open request must specify write access and are always opened using the file open flags (O-CREAT | O-EXCL | O-RDWR) and an access mask of (0600). For security reasons, these file open flags and this access mask is always used—without regard to the flags and access mask specified by the file open request. You cannot create files using file open flags that specify the file is to be opened for read-only access. To limit the file size or set disk usage quotas, you must do so at the operating system level.