Read Permission


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Read Permission
# 8  
Old 05-22-2006
Quote:
Originally Posted by System Shock
.. or for those of us who do not like to type that much

ls -l

and quickly scan the permissions column
There isn't a command that shows you which files are readable because all files are created readable. You'd have to manually make a file unreadable, so it makes no sense to have a command that displays only readable files, since 99.99% of files are readable.
not necessarily,
what if the files are created with read mode permission bit masked off?
(Ideally nobody would have opted that way)
# 9  
Old 05-22-2006
I think what you're looking for is the find command:
Code:
find -perm 644 -maxdepth 1

With the -perm flag, find will return files that match the given permissions. It checks all files in the current directory and through each subdirectory of the current directory - hence the "maxdepth 1" which makes it only search the current directory.

As stated, just about every file on the system is readable by someone. By using find you can specify whether to return files that are group or world readable.

Here's the man page on find: http://linux.about.com/od/commands/l/blcmdl1_find.htm
And this spells out usage fairly well: http://www.linux.ie/newusers/beginne...guide/find.php
# 10  
Old 05-22-2006
Quote:
Originally Posted by matrixmadhan
not necessarily,
what if the files are created with read mode permission bit masked off?
(Ideally nobody would have opted that way)
..so what if they are? Still, there's no command that specifically will show you what's readable or not.

The solution presented above by this213 is as good as it gets, however, it is not a command that will specifically tells what's readable or not, but rather looks for specific permissions, which is not the same thing.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Checking if the directory has read and write permission

logMsg='Started by '${USER} LOG_MESSAGE "${logMsg}" resultCode=$? if ]; then return ${resultCode} fi touch ${FILELISTPATH} resultCode=$? if ]; then logMsg='failed to create file list:'${FILELISTPATH} LOG_ERROR "${logMsg}" CUSTOM_PREPROCESS ${FATAL} ... (2 Replies)
Discussion started by: raka123
2 Replies

2. Shell Programming and Scripting

Find list of files missing read & execute permission

Hi, I'm writing a post-upgrade script and I want to find which files don't have read and execute to everyone. I can run a find . ! -perm, but then I have to use a list of the possible permissions (777,775, 755 etc). Is there a more elegant solution? Thanks (2 Replies)
Discussion started by: Catullus
2 Replies

3. Solaris

Read Only Permission after the space is full.

Hi, Is there any chance that a file system that mounted on the server becomes read only when the space in that file system becomes full? Regards, Sreejith (9 Replies)
Discussion started by: Sreejith K
9 Replies

4. Ubuntu

how to make others have read/write permission when the aotu mounted usb flash disk pluge in ?

hi all: as we know , when usb flash disk plug in and aotu mounted , the default permission of the usb flash disk is 700. that means others have no permission . the question: how to make others have read/write permission when the aotu mounted usb flash disk pluge in ? thanks !! (0 Replies)
Discussion started by: arnold.king
0 Replies

5. Shell Programming and Scripting

perl script to check read/write/execute permission for 'others'

I want to check access rights permissions not for 'user', not for 'group', but for 'others'. I want to do it by system command in which i want to use 'ls -l' and 'awk' command. I have written the following program : #!/usr/bin/local/perl #include <stdlib.h> system ("ls -l | awk... (1 Reply)
Discussion started by: shubhamsachdeva
1 Replies

6. HP-UX

Lost Read permission on my folder

Hi I am a normal user on a HP-UX system which is meant for a large group. There are few directories which I think i am owner of. (Name of these directories is same as my username, and I usually have all the permissions in these directories). I was trying to give read and execute... (2 Replies)
Discussion started by: grvs
2 Replies

7. UNIX for Dummies Questions & Answers

CHMOD....read only permission

After creating a user account...how do i verify if theres only read access on the account. If not read access would i enter chmod a-xw "username"? (2 Replies)
Discussion started by: bigben1220
2 Replies

8. Shell Programming and Scripting

give permission to read a file

I want to give tester only the account tester to view the file /var/mail/root nobody else but him and of course the owner root w/o changing the permisions of /var/mail/root -rw-------. $ cat /var/mail/root cat: /var/mail/root: Permission denied (3 Replies)
Discussion started by: kenshinhimura
3 Replies

9. UNIX for Dummies Questions & Answers

Permission file questions--Please read!!!

1. I have an executable file that I have granted the users full permission "777" for it to work. I don't want the user to read this file! How can I prevent a user to read it? Thanks (4 Replies)
Discussion started by: bobo
4 Replies

10. UNIX for Advanced & Expert Users

read permission but cant ls -l it.

ok what is the signifigance of the -l that wont let you list the contents of a directory you clearly have access to list files. what am i missing /tmp$ls -l hold hold/file1: Permission denied total 0 /tmp$ls hold file1 /tmp$ls -l dr-x---r-- 2 root other 179 Apr 23... (6 Replies)
Discussion started by: Optimus_P
6 Replies
Login or Register to Ask a Question