Folks,

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
486101627
accept rate: 25%

edited 04 Dec '12, 09:03

Mark%20Culp's gravatar image

Mark Culp
23.0k9130270


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
23.0k9130270
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

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "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:

×412
×24
×1

question asked: 03 Dec '12, 23:12

question was seen: 631 times

last updated: 04 Dec '12, 09:03