Jump to content

Checking file ownership and permissions


bromar
 Share

Recommended Posts

Is there a utility in 9.1 that will check system files and devices for proper ownership and permissions? I'm asking because there are a number files in /dev that are owned by my user account rather than root. I suspect these files are owned incorrectly and would like to verify the entire system.

Link to comment
Share on other sites

Is there a utility in 9.1 that will check system files and devices for proper ownership and permissions?  I'm asking because there are a number files in /dev that are owned by my user account rather than root.  I suspect these files are owned incorrectly and would like to verify the entire system.

 

You are talking about the ls command (maybe). Typing

 

ls -1A will give you a column list of files in any directory. If you do not understand the output, then you need to locate a tutorial on file permissions for linux. Check the DOCS link at top of page. Otherwise, please clarify what you are actually looking for :)

 

Also, you can check out the chown command

 

chown -R root:root /somepath

 

should change the ownership back to root for any folder and subfolders (-R)..

Link to comment
Share on other sites

Tree can give you a nice list too. It'll recursively list directories and their files starting from the working directory.

 

tree -a -u > files.txt

This will save the output into the file files.txt to make it easier to look at.

 man tree

to see what else you can do with tree.

Link to comment
Share on other sites

Well there must be ownership and/or permission issues since logged in as root audio CDs will play but not if logged in as an ordinary user. This being the case I'd like to get the ownership and permissions corrected but I don't know what they should be.

 

Working with SCO Unix years ago I recall a utility that compared the current system files ownership and permissions against a database containing the proper values. Does such as utility exist in MDK 9.1 or am I relegating to guessing what the proper ownership and permissions should be?

Link to comment
Share on other sites

[booyah@yoyoyo mnt]$ ll /mnt

total 4

drwxrwxrwx    1 root     root            0 Sep 15 09:21 cdrom/

drwxr-xr-x    2 root     root         4096 Oct 22  2002 disk/

drwxrwxrwx    1 root     root            0 Sep 15 09:21 floppy/

 

Maybe this will help?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...