# /usr/local permissions problem



## danielmartinj (May 24, 2010)

Hello everyone,

I have come across an interesting problem. Since I last used my Freebsd 7.2 server it was working fine and the power went out.  Now when I log on as root using putty I get:
/libexec/ld-elf.so.1: Shared object "libXaw7.so.7" not found, required by "xcalc" 

I also cannot start my apache server. /usr/local/sbin/apachectl start

The last thing I remember doing was changing my permissions last Friday.
chmod 777 * in various subdirectories of /usr/local and /usr/local itself when I was trying to create multiple instances of httpd

I have a feeling the reason I am getting these odd errors are a permissions problem in /usr/local and its sub directories.  I was hoping someone could validate this and possibly let me know the best way to go about this problem?


Thanks,

matt


----------



## danielmartinj (May 24, 2010)

Hello there,

I thought it was just something really simple.  However, I was not positive.  It works now all I did is change those directories to chmod 755 and then rebooted at is seems like it is working now.  I wonder why it does not work when set to chmod 777?


----------



## DutchDaemon (May 24, 2010)

There is no specific answer other than that several applications (rightly) distrust an environment where everybody can write.


----------



## SirDice (May 25, 2010)

danielmartinj said:
			
		

> The last thing I remember doing was changing my permissions last Friday.
> chmod 777 * in various subdirectories of /usr/local and /usr/local itself when I was trying to create multiple instances of httpd


Don't ever do that again. Never, EVER, give world write access without a very good reason.


----------



## danielmartinj (May 25, 2010)

Yes,

I understand the error in my ways.  But do you know what the default permissions are for these diretories?


----------



## SirDice (May 25, 2010)

You can find them in /etc/mtree/BSD.local.dist. See mtree(8) on how to use it.


----------

