The forum will experience an outage sometime between February 10 at 7:00pm EST and February 12 at 11:59 EST for installation of security updates. The actual time and duration of the outage are unknown but attempts will be made to minimize the downtime. We apologize for any inconvenience.


Just wanted to get some clarification on the expected file permission behaviour when using sql anywhere as an embedded database on OSX (or any other nix)

When we create a brand new database it gets -r--r--r-- permissions. When we start a dbeng12 process using that database the file permissions change to -rw------- which is fair enough. Once we close the database the file permissions go back to -r--r--r--. Ok so far.

If I then change the file permissions (chmod g+w) then open and close the database again the file permissions go back to -r--r--r--. Is this what I should expect?

As we are using SA12 as an embedded db server, we are treating the files as user files and while I can understand the permission change when we have the file open, I need to be able to explain why the permissions don't go back to what they were before we opened the database to our QA department... :)

Cheers, Dan

asked 03 Dec '12, 23:12

Dan%20Cleyne's gravatar image

Dan Cleyne
accept rate: 25%

edited 04 Dec '12, 09:03

Mark%20Culp's gravatar image

Mark Culp

The file permissions changes that you are seeing are expected.

The database server changes the permissions to -rw------- when using it so that the server can update the file. When the database is closed the server changes the file permissions back to -r--r--r-- so that the file is not accidentally changed by other programs since if this were to happen the database would most likely be corrupted and you would lose your data.

permanent link

answered 04 Dec '12, 09:02

Mark%20Culp's gravatar image

Mark Culp
accept rate: 40%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 03 Dec '12, 23:12

question was seen: 559 times

last updated: 04 Dec '12, 09:03