Check the permissions linux user


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Check the permissions linux user
# 1  
Old 04-10-2012
Check the permissions linux user

i have some question
Quote:
Check the permissions of a user
Users enter a user and a path to the directory.
Returns the result is the child folders and files in the folder the user to enter and rights that
that user on the directory.
for example:
suppose we have the Public folder as follows:

Check the permissions linux user-capturepng

If the user enter:
-Kenshin
or /home/kenshin/Public
output:
Code:
 abc: kenshin: rw

my shell:
Code:
echo "Enter User:"
      read user        
       grep "$user" /etc/group

but not very feasible, one can help me, help me plzzz, thank very much
Check the permissions linux user-capturepng
# 2  
Old 04-10-2012
Is this homework?
This User Gave Thanks to Corona688 For This Post:
# 3  
Old 04-10-2012
Quote:
Originally Posted by Corona688
Is this homework?
Yes Sir! I started to learn linux
# 4  
Old 04-10-2012
Do not post classroom or homework problems in the main forums. Homework and coursework questions can only be posted in this forum under special homework rules.

Please review the rules, which you agreed to when you registered, if you have not already done so.

More-than-likely, posting homework in the main forums has resulting in a forum infraction. If you did not post homework, please explain the company you work for and the nature of the problem you are working on.

If you did post homework in the main forums, please review the guidelines for posting homework and repost.

Thank You.

The UNIX and Linux Forums.
This User Gave Thanks to Corona688 For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

What's the best way to check file permissions before moving files if needed?

Hello, I would like to know if it's a good practice to check the file permissions of the contents of a directory before moving them. For example: mv -- "$directory"/* "$directory"/.* "$directory"/..?* "$destination"The variables $directory and $destination contain the path to an existing... (6 Replies)
Discussion started by: Cacializ
6 Replies

2. UNIX for Dummies Questions & Answers

Is there a way to check when the permissions for the file got changed in AIX

Is there a way to check when the permissions for the file got changed in AIX IS there some file which logs all these details? Best regards, Vishal (4 Replies)
Discussion started by: Vishal_dba
4 Replies

3. Shell Programming and Scripting

To check the file permissions using python scripting

Hi, For a particular set of files, am trying to check if they are writable. i.e., checking whether they are having permissions greater than 755. Am able to check this using the statement: "if (os.path.isfile(FILE_PATH) and (os.stat(FILE_PATH).st_mode & 0777) == 0777):" But the problem... (1 Reply)
Discussion started by: arjun_arippa
1 Replies

4. Programming

To check the file permissions using python scripting

Hi, For a particular set of files, am trying to check if they are writable. i.e., checking whether they are having permissions greater than 755. Am able to check this using the statement: "if (os.path.isfile(FILE_PATH) and (os.stat(FILE_PATH).st_mode & 0777) == 0777):" But the problem here... (0 Replies)
Discussion started by: arjun_arippa
0 Replies

5. Red Hat

Control M user permissions on Red Hat Linux

All, Requirement: Permissions Required for Control M on Linux I am using the Linux as the operating system. I am told to get an user configured for Control M on Linux. The user would be an authenticated user created by the client. The user created requires permissions to be made available so... (2 Replies)
Discussion started by: Roadies99
2 Replies

6. Homework & Coursework Questions

Check the permissions user

i have some question for example: suppose we have the Public folder as follows: https://www.unix.com/attachments/shell-programming-scripting/2759d1334070669-check-permissions-linux-user-capture.png If user enter: -Kenshin or /home/kenshin/Public output: abc: kenshin: rw my shell:... (1 Reply)
Discussion started by: kingkner
1 Replies

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

8. Shell Programming and Scripting

How to check the mail permissions

Hi - I am trying to send email from unix box but none were delivered. I have tried multiple commands like mailx, mail or sendmail. But none of them worked. can you please let me know how to check if I have the right permissions to send the mail or not? (1 Reply)
Discussion started by: ahmedwaseem2000
1 Replies

9. Shell Programming and Scripting

check if user has read permissions

hi all, i have a script (ksh) which reads data from log files, how do i check to see if the user which is executing the script has read permissions to the file ? thanks in advance. (2 Replies)
Discussion started by: cesarNZ
2 Replies

10. Shell Programming and Scripting

Using grep - check the permissions of the file searched

What I need to do is: I need to use the grep command to search for pattern in directory and sub-directories. And also I need to show the permission of file been seached by the grep command. Could any one please suggest me? ----------------- $> cat file1.txt A -----------------... (8 Replies)
Discussion started by: Johny001
8 Replies
Login or Register to Ask a Question