# Equivalent command for freeBSD..



## gadz30795 (May 13, 2010)

im looking for the equivalent command for FreeBSD...


```
chown wwwrun:www /usr/local/nagios/share/nagvis -R
chmod 664 /usr/local/nagios/share/nagvis/etc/nagvis.ini.php
chmod 775 /usr/local/nagios/share/nagvis/nagvis/images/maps
chmod 664 /usr/local/nagios/share/nagvis/nagvis/images/maps/*
chmod 775 /usr/local/nagios/share/nagvis/etc/maps
chmod 664 /usr/local/nagios/share/nagvis/etc/maps/*
chmod 775 /usr/local/nagios/share/nagvis/var
chmod 664 /usr/local/nagios/share/nagvis/var/*
```


----------



## sixtydoses (May 13, 2010)

In FreeBSD you can use chown() and chmod() as well.

e.g.:
`chown -R user:group file`
`chmod -R 644 file`


----------



## gadz30795 (May 13, 2010)

I see. I've tried chown command but it says invalid argument. Maybe the problem is on the user area. I was just assuming that nagiosadmin is my user but I really don't know if it is the real user. Do you have any idea on how to get the users? Is there a command for it? thanks.


----------



## vermaden (May 13, 2010)

gadz30795 said:
			
		

> I see. I've tried chown command but it says invalid argument.



Try it that way:
`# chown -R wwwrun:www /usr/local/nagios/share/nagvis`


----------



## sixtydoses (May 13, 2010)

It'll be helpful if you could paste us the command that you ran and the error that you got.

If you didn't create any user for nagios, then user nagiosadmin does not exist. You can check in the /etc/passwd for all users exist in your system.

Run `more /etc/passwd | grep nagiosadmin` and if there is no output, there is no user by that name.


----------

