[NTLUG:Discuss] permission detection tool(?)

Greg Edwards greg at nas-inet.com
Wed Nov 2 19:21:49 CST 2005


Johnny Cybermyth wrote:
> I recently made a major blunder and changed permissions on every file 
> and directory in the /usr directory.  I am slowly discovering all of the 
> applications that I broke.
> 
> I have an application that writes files and directories under a specific 
> directory in my file system (/backup/music/).  This application now no 
> longer is able to write files to that directory.  I can run the 
> application using sudo and it will write just fine.
> 
> I've made sure that the destination directory is writable to me in a 
> normal shell.  The directory has the following permissions:
> 
> drwxrwxr-x    root    johnny
> 
> When I look at the system monitor, it says that my application is a 
> process belonging to johnny.  I'm not sure how else to check what gid 
> the programming is running under.  Is there some type of trace tool that 
> will detect when a program is prevented from creating a file due to 
> insufficient permissions?
> 
> Any other thoughts would be appreciated.

Cybermyth,

First off, what permissions did you change, (owner | group | other)?

One solution would be to login as root and cd to /usr.  Run "chmod -R 
a+rwx,u+rx,o+rx *".

This will set all of the files to rwxr-xr-x that don't already have that 
setting.  It will not remove any permissions, just add.

There are files that you really don't want to have execute on other, but 
this will at least make your system usable.  Getting all of the files 
under /usr/bin and /usr/sbin right can be tedious ;(

-- 
Greg Edwards
New Age Software, Inc. - Software Engineering Services
http://www.nas-inet.com




More information about the Discuss mailing list