Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

chkstat(8) [suse man page]

CHKSTAT(8)					      Tool to check and set file permissions						CHKSTAT(8)

NAME
chkstat - Tool to check and set file permissions SYNOPSIS
chkstat [--set|-set] [--noheader] [[--examine file ]...] [[--files filelist ]...] [[--root directory ]...] permission-file ... DESCRIPTION
The program /usr/bin/chkstat is a tool to check and set file permissions. Multiple permissions files can be given on the commandline. If the permission files contain multiple entries for a single file, the last entry found will be used. General Options --set, -set This option enables setting the file permissions, the default is to check and warn only. --noheader Omit printing the output header lines. --examine file Check permissions for this file and not all files listed in the permissions files. --files filelist Check permissions for the files listed in filelist and not for all files listed in the permissions files. --root directory Prefix the files given in the permissions files by this directory. EXAMPLE
The command chkstat -set /etc/permissions will parse the file /etc/permissions and set the access mode and the user- and group memberships each file listed. The format for the input file is FILEPATH OWNER:GROUP MODE and wildcards are not supported for the filepath. Lines starting with '#' and empty lines are treated as comments. COPYRIGHT
1996-2003 SuSE Linux AG, Nuernberg, Germany. 2008 SUSE LINUX Products GmbH AUTHORS
Reinhold Sojer, Ruediger Oertel, Michael Schroeder Useful changes and additions by Tobias Burnus 3rd Berkeley Distribution 2008-04-17 CHKSTAT(8)

Check Out this Related Man Page

DH_FIXPERMS(1)							     Debhelper							    DH_FIXPERMS(1)

NAME
dh_fixperms - fix permissions of files in package build directories SYNOPSIS
dh_fixperms [debhelperoptions] [-Xitem] DESCRIPTION
dh_fixperms is a debhelper program that is responsible for setting the permissions of files and directories in package build directories to a sane state -- a state that complies with Debian policy. dh_fixperms makes all files in usr/share/doc in the package build directory (excluding files in the examples/ directory) be mode 644. It also changes the permissions of all man pages to mode 644. It makes all files be owned by root, and it removes group and other write permission from all files. It removes execute permissions from any libraries, headers, Perl modules, or desktop files that have it set. It makes all files in the standard bin and sbin directories, usr/games/ and etc/init.d executable (since v4). Finally, it removes the setuid and setgid bits from all files in the package. OPTIONS
-Xitem, --exclude item Exclude files that contain item anywhere in their filename from having their permissions changed. You may use this option multiple times to build up a list of things to exclude. SEE ALSO
debhelper(7) This program is a part of debhelper. AUTHOR
Joey Hess <joeyh@debian.org> 9.20120909 2012-05-19 DH_FIXPERMS(1)
Man Page

15 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Command file in unix.

Need to know how to create self commands in unix. I want to do some jobs in my unix machine regularly. i want to make a command kind of stuff. Please let me know how to create a command file in unix. I crated a file in bin directory and used my logic there it works fine like command when i... (11 Replies)
Discussion started by: Krrishv
11 Replies

2. UNIX for Dummies Questions & Answers

Question about GREP

I have 2 files, in one file is a list of hex numbers, the other is what i need matched. Is it possible for me to specify to grep the list and have it go through the second file for each item in the list in the first file to match the lines? so this is like a cross-refference. (16 Replies)
Discussion started by: Adriel
16 Replies

3. UNIX for Dummies Questions & Answers

Setting permissions

I've been told I need to set the permissions for everything in the htdocs folder to 777, but how do I go about doing this? Thanks:o (9 Replies)
Discussion started by: thehaapyappy
9 Replies

4. UNIX for Advanced & Expert Users

File Permissions

Hi All, Could any one help me on is there any file where all file permissions are being stored? Please help me. (10 Replies)
Discussion started by: umesh.rout
10 Replies

5. Shell Programming and Scripting

Check the Usability of files

Hi All, I am in the process of collecting data which i need for further analysis and taking necessary actions. Can i check when a certain file was used last time. How can i differentiate that usage and creation is different in Unix. I have log files but those are huge in size not... (10 Replies)
Discussion started by: karansachdeva
10 Replies

6. Shell Programming and Scripting

HELP changing file permissions

does anyone know how to write a script that will change file permissions. because the Admin blocked me from altering any of my files im only allowed to read and i heard a script like this can bypass it but i dont know how to write it. Display current users. Display user Ids only. Display... (10 Replies)
Discussion started by: live2learn
10 Replies

7. UNIX for Dummies Questions & Answers

How to find a user's file permissions

Hi. I would like to know if there is any command that could list simple file permissions (like , R , RW..etc) for a given uid/userid and on a given file/dir. (9 Replies)
Discussion started by: ram123
9 Replies

8. Solaris

user permissions

hi i want to display the usernames,usergroups user permissions and user home directory's with in a single command.and possibities are their for getting this output .. (9 Replies)
Discussion started by: tv.praveenkumar
9 Replies

9. Shell Programming and Scripting

I need script Copy permissions of files and folders from one server to another

Hi.. I have 2 servers with linux suse10. I made a mistake and on one of the servers changed with chmod the permission of root in directory /. In the other servers the permissions are correct Please i need a script, to change the permissions of one server 1, using the same permission of the... (11 Replies)
Discussion started by: ave-phoenix
11 Replies

10. UNIX for Dummies Questions & Answers

find problem with exec

Hi, i want to make a script that calculates the total size in bytes from files from a directory(first argument) and displays "Total :xxxxx", the second argument must indicate the minimum size of files processed and the third argument indicates the path to a file that will save the processed file... (21 Replies)
Discussion started by: MorpheusC
21 Replies

11. Red Hat

secure file permissions!

Hi experts, I have RHEL6 system which I want to tighten by having strict permissions for some important files. Looks like, RHEL has below permissions by default:- /etc/passwd:644:root:root /etc/shadow:000:root:root /etc/services:644:root:root /etc/hosts.allow:644:root:root I am... (10 Replies)
Discussion started by: shreeda
10 Replies

12. UNIX for Dummies Questions & Answers

unix script with SQL statement problem

Hello, I have a script to get the information from database, however, it's look like the loop is not work, can someone help? :confused: echo Input file list to check: read filelist for file in 'cat $filelist.txt' do echo "select FILENAME from FILE_TABLE where filename like '${file}'%;" >>... (9 Replies)
Discussion started by: happyv
9 Replies

13. Solaris

Change permissions for files

Hi! I have a dir in a server, that receives files with the wrong permissions, so I decide to put on a cron entry that changes its permitions, but because of the time gap, not all of them get changed. What I did was the following: ... (14 Replies)
Discussion started by: fretagi
14 Replies

14. Shell Programming and Scripting

Check for file permission

Hi, I have an array that has several directory paths and file paths. I use a for loop to traverse through the array and check for files and not directories using the if condition. I wish to display all files that have permissions lesser than what the user has specified. For example: ... (14 Replies)
Discussion started by: mohtashims
14 Replies

15. AIX

How to create all files generated in a directory with 644 permissions?

Hi, We are using AIX machines. How to create all files generated in a directory with 644 permissions automatically. Regards, Suresh (11 Replies)
Discussion started by: suresh3566
11 Replies