Command to check the user's permission in UNIX ??


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Command to check the user's permission in UNIX ??
# 1  
Old 07-29-2009
Command to check the user's permission in UNIX ??

Hi,

What is the command to check the user's permission in UNIX ?
e.g: user in UNIX is "myuser"

The result should be number format. e.g: 755, 644, etc...

Thanks.. Smilie
# 2  
Old 07-29-2009
find -user nobody -type f -exec ls -al {} \;
find -perm 644 -type f -exec ls -al {} \;
find -perm 777 -type d -exec ls -al {} \;

This works great in the user's public_html/httpdocs directories.

HTH!
# 3  
Old 07-29-2009
Quote:
Originally Posted by suigion
Hi,

What is the command to check the user's permission in UNIX ?
e.g: user in UNIX is "myuser"

The result should be number format. e.g: 755, 644, etc...

Users don't have permissions; files do.

What do you really want to know?
# 4  
Old 07-29-2009
more accurately, Users do carry permission defaults, which are then checked against those on a given system object. you might want to track down the umask defined for your session:

grep -i umask ~/.profile /etc/profile

and read up on the umask setting in general.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

How to run root level command , if user has "su -" permission in sudoers provided?

I am looking t run root level command on multiple servers, but all servers have only "su - " permission available in sudoers. please help me if any way that I can run command using help of "su -" My script for hosts in `cat hosts.txt`; do echo "###########################Server Name-... (5 Replies)
Discussion started by: yash_message
5 Replies

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

3. UNIX for Advanced & Expert Users

Command to check java file in UNIX

Guys, i need to check whether java file can be executed in my current unix system or not. Can anyone please help me to get the correct command to check this. My Unix system is HP-UX. Thanks, (1 Reply)
Discussion started by: AraR87
1 Replies

4. Shell Programming and Scripting

set only some command & scripts permission to a particular user

hi, i am new in unix.......i am using bash and i want to create a user which has only some command and scripts permission.........is it possible? thanx (1 Reply)
Discussion started by: rakeshtomar82
1 Replies

5. UNIX for Dummies Questions & Answers

PERL/UNIX - SVN check in command

I am working in perl. I need to do some svn check in from my server. I need to install svn in my server. I have the package "svn" in my server path How can I install that in my server. I tried , but this doesnt work. Can you please help with the command to be used. Thanks in... (0 Replies)
Discussion started by: irudayaraj
0 Replies

6. Shell Programming and Scripting

Command to check the CPU usage for particular user

Hi All, Can anybody knows, how to check the CPU usage in percentage for a particular process along with its user and PID? Thanks in advance!! (3 Replies)
Discussion started by: AB10
3 Replies

7. UNIX for Dummies Questions & Answers

Command to check unix have web server

Hye All Any body know what is command to check whether unix have web server. (3 Replies)
Discussion started by: mastercar
3 Replies

8. AIX

run which command to check the actual user

hi gurus, i have a question: when run which javac under a user account I got the following results: PROD DB Server: /usr/java14/bin/javac DR DB Server: /usr/java14/bin/javac DEV DB Server: /usr/java5_64/bin/javac The .profile in all environments are same. so how do know who is the... (1 Reply)
Discussion started by: lweegp
1 Replies

9. UNIX for Dummies Questions & Answers

Limit Unix command to user

Is it possible to limit a user account to only several commands. For security reasons, i would like for some users given accounts to only execute commands limited to them. If possible, how can it be done? tyvm. (1 Reply)
Discussion started by: coolphilboy
1 Replies

10. UNIX for Advanced & Expert Users

Running a Unix command as a different user

hi, I wrote a C program (runas.c) that runs a command as a different user. The problem I'm having is that the new user's group membership isn't going into effect. Take the following scenario: I login as "kirk". I need to run some commands as "spock". kirk and spock belong to these... (4 Replies)
Discussion started by: Andrewkl
4 Replies
Login or Register to Ask a Question