How to find a user's file permissions


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers How to find a user's file permissions
# 1  
Old 03-18-2009
Question 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.
# 2  
Old 03-19-2009
Quote:
Originally Posted by ram123
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.
with simple
Code:
 
ls -l

command you can get the file/dir permission and third column will show the userid also
# 3  
Old 03-19-2009
Good starting point
Code:
stat --printf "Human Readable: %A \nGroup name of owner %G \n"  file

# 4  
Old 03-19-2009
Quote:
Originally Posted by aaaaargh
Good starting point
Code:
stat --printf "Human Readable: %A \nGroup name of owner %G \n"  file

Isn't this valid for Linux only?
# 5  
Old 03-19-2009
stat does not seem to be available on my server ( sun os ). also , would like to know the user's permissions even if the user is a member of a group that owns the resource. thanks .
# 6  
Old 03-19-2009
Can we try another way: what issue are you facing?
# 7  
Old 03-19-2009
ok.
In the UI(webpage) i would like to show list of directories that user has access to. ( this user has the unix account and is just a normal user of the webapp).

Another caveat is , these users may also be in groups which have access to the directories. I want to get these dirs also displayed in the UI.

( server is running as a different functional acct ).

I think this other thread has some useful info (https://www.unix.com/security/55223-recursively-find-change-permissions-man-pages.html ) . like using find. for example : find filename.txt -type f -user userid -o -type f -perm -4
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

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

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

3. Shell Programming and Scripting

new-user permissions

Hi, i'm using a Unix machine. I login as root. when i create new users using useradd -m <user_name> their home directories will be created in /home/ directory with default permissons of 750. i.e., drwxr-x--- how can i change these default permissions..?? which file to access and what changes i... (2 Replies)
Discussion started by: sandeepyes
2 Replies

4. Shell Programming and Scripting

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. (1 Reply)
Discussion started by: ggayathri
1 Replies

5. UNIX for Dummies Questions & Answers

How to see a user's permissions on a directory

i know about ls, I know.... but some of our shares have a long messy list of acls and it is a lot to sort through.. without a grep option, unless you have a really nice one, is there a simple way to say: show me <USER> acl permissions on <SHARE> ? (1 Reply)
Discussion started by: glev2005
1 Replies

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

7. UNIX for Dummies Questions & Answers

How to do i change the user permissions..

Hi everyone, There are couple of users of which i need to give 2 of the users admin rights so that they are able to run the administration commands like "zoneadm" and locale. When logged in as root i am obviously able to do that.please suggest any way by which the other 2 user's permissions... (1 Reply)
Discussion started by: sankasu
1 Replies

8. UNIX for Dummies Questions & Answers

user permissions question

I have an application where in a user uploads files into a directory that has a collection of image files, as well as a text file that is read by a web script later. The script imports the text file data into a database, then copies the image files to a secure location. Ideally it should remove... (1 Reply)
Discussion started by: cdw.lighting
1 Replies

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

10. UNIX for Advanced & Expert Users

Changing permissions of a user

So I need to change the permissions of my user account. I can access the root account on the server, but don't know how to change the permissions of my user account. I was advised to try 'userconf' to see if I am part of a group, but I dunno how that works. ANyone who knows how to see the... (3 Replies)
Discussion started by: achink125
3 Replies
Login or Register to Ask a Question