# SAMS error on FreeBSD 9.2



## hucker91 (Jun 24, 2015)

Hello everybody!
Tell please, why such mistake.

Web interface SAMS demands the right to record in the catalog ./data

```
inaccessible to record
The catalog ./data is closed for record. To continue installation, adjust permissions manually.
```
Check up an error message and try again.

```
Warning: fopen(data/test.txt): failed to open stream: No such file or directory in /usr/local/www/sams2/setup.php on line 86
```


----------



## SirDice (Jun 24, 2015)

I don't use SAMS but this usually does the trick:
`chown www:www /usr/local/www/sams2/data`
`chmod 755 /usr/local/www/sams2/data`


----------



## hucker91 (Jun 24, 2015)

It didn't help.

I haven't data in /usr/local/www/sams2/
It existed on /usr/local/www/apache24/


----------



## junovitch@ (Jun 24, 2015)

If /usr/local/www/sams2 is the directory installed by the port, does there need to be a www writable data directory?  Taking a guess but what about this:
`mkdir /usr/local/www/sams2/data`
`chown www:www /usr/local/sams2/data`

Something to think about once you figure this out is that FreeBSD 9.2 has been end of life since December 31, 2014.  You'll find more infomation on supported releases on https://www.freebsd.org/security/security.html along with the link to the unsupported releases.  See also:  https://forums.freebsd.org/threads/topics-about-unsupported-freebsd-versions.40469/


----------



## hucker91 (Jun 25, 2015)

Thanks, you were right, the problem is solved after I created new directory and granted it a new rights www:www

But after that I have the following mistake:


```
hostname: 
Notice: Undefined variable: dbadmin in /usr/local/www/sams2/setup.php on line 262
```

I all the same filled the empty fields to create a new base and user. After also gives out the following mistake:


```
db:MySQL
Create database sams2db
Invalid query: Access denied for user ''@'localhost' to database 'sams2db'
```


----------



## SirDice (Jun 25, 2015)

Create a user on MySQL and assign that name to the variable dbadmin. Then make sure the password of that user is correct.


----------



## hucker91 (Jun 25, 2015)

Excuse me, it is possible on in more detail, please?


----------



## junovitch@ (Jun 28, 2015)

hucker91 said:


> ...
> 
> ```
> hostname:
> ...



It looks like the dbadmin variable is empty at line 262.  Assign some user name to it.  Then follow the MySQL documentation on creating users to make the matching username you configured.

https://dev.mysql.com/doc/refman/5.5/en/create-user.html


----------

