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

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!

Users don't have permissions; files do.

What do you really want to know?

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.