Sponsored Content
Top Forums Shell Programming and Scripting Script to find the user of a file and permissions Post 302444564 by ggayathri on Thursday 12th of August 2010 06:43:28 AM
Old 08-12-2010
Script to find the user of a file and permissions

I have a list of files in a.txt file. For each of the files listed in that file, I would like to obtain the owner of the file and also, the permissions associated with that file.
If possible, the group the owner belongs to as well.
Can someone help me with a script to find that out.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

How to find permissions/roles/priveleges of User

Hello Everyone, if we log on to unix server how do we find that what permissions/roles and priveleges are assigned to any particular user. Here i am not talking about the file permissions. Thanks (1 Reply)
Discussion started by: hardesh
1 Replies

2. 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

3. Shell Programming and Scripting

permissions to create log file from script

hi all, have a script which i am using to generate a log file. i use "touch out.log" command to create the file and later on i want to echo lines to this file. for some reason it keeps giving me this error when i try and create the file ; touch: out.log cannot create i have... (3 Replies)
Discussion started by: cesarNZ
3 Replies

4. Shell Programming and Scripting

How to check file permissions from a script.

hello, I have to write a script to run the other script inside it.So iam planning to write like this? first check the perimissions of the file. Alogorthim ---------- if(!filepermissions == execute) then echo" Permissions denined" else execute the script. file name is : load_mf.sh... (1 Reply)
Discussion started by: rajkumar_g
1 Replies

5. Shell Programming and Scripting

File permissions for particular user

Hi, How can we assign file permissions for a purticular user, rather than giving to whole group. Thanks. (4 Replies)
Discussion started by: karumudi7
4 Replies

6. Shell Programming and Scripting

Changing file permissions of a file created by another user

Hi, I have used expdp for datapump. The .dmp file is created by the "oracle" user. my requirement is to make a zipped file of this .dmp file. What i am trying to do is change the permissions of this .dmp file from 0640 to 0644 and then do a gzip and zip it. Is there any way i can change... (3 Replies)
Discussion started by: qwertyu
3 Replies

7. Shell Programming and Scripting

Script to give a user sudo permissions

Can some one please let me know a script which gives the user sudo permissions? Thanks in advance.... (6 Replies)
Discussion started by: Revanth547
6 Replies

8. Windows & DOS: Issues & Discussions

Script for adding users to file permissions

I need a script to add the following two users ids to the permissions for various files: IIS_WPG and IUSR_CowGirl. I am fairly familiar with scripting but haven't been able to figure out how to do this via a script. Manually doing it is slow. I don't want to create users but only add them to a... (2 Replies)
Discussion started by: Stu Loventhal
2 Replies

9. Shell Programming and Scripting

Script for adding users to file permissions

I need a script to add the following two users ids to the permissions for various files: IIS_WPG and IUSR_CowGirl. I am fairly familiar with scripting but haven't been able to figure out how to do this via a script. Manually doing it is slow. I don't want to create users but only add them to a... (2 Replies)
Discussion started by: Stu Loventhal
2 Replies

10. UNIX for Dummies Questions & Answers

Script without execute permissions will work for a user?

Please help me to understand the issue: Issue: There are shell scripts in a user home directory (/home/user_1) without execute permissions (rw-r--r--) to owner,group and world These shell scripts were able to execute/work previously but its not working now and it says permission denied or... (2 Replies)
Discussion started by: MSK_1990
2 Replies
pam_console_appy(8)					   System Administrator's Manual				       pam_console_appy(8)

NAME
pam_console_apply - set or revoke permissions for users at the system console SYNOPSIS
pam_console_apply [-r] DESCRIPTION
pam_console_apply sets or resets permissions on devices in the same manner as pam_console. If /var/run/console.lock exists, pam_console_apply will grant permissions to the user listed therein. If the lock file does not exist, permissions are reset to those listed in /etc/security/console.perms, which should be configured to set permissions on devices so that root owns them. ARGUMENTS
-r Signals pam_console_apply to reset permissions. The default is to set permissions so that the user listed in /var/run/console.lock has access to the devices, and to reset permissions if no such file exists. FILES
/var/run/console.lock /etc/security/console.perms SEE ALSO
pam_console(8) console.perms(5) BUGS
Let's hope not, but if you find any, please report them via the "Bug Track" link at http://bugzilla.redhat.com/bugzilla/ AUTHOR
Nalin Dahyabhai <nalin@redhat.com>, using code shamelessly stolen from parts of pam_console. Red Hat 2001/3/6 pam_console_appy(8)
All times are GMT -4. The time now is 12:40 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy