Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Cross-posted: How can I know the privileges against a file in Linux?

I have logged into a Linux server as a normal user (not as an admin) to see some shell scripts in a directory. Assume that a file named is present in the directory.

How can I know which rights / privileges are provided to me for that file ( How would I see if it is read-only or if I can modify it?

share|improve this question

migrated from Sep 14 '11 at 12:23

This question came from our site for professional and enthusiast programmers.

closed as off topic by Sathya Sep 14 '11 at 14:49

Questions on Super User are expected to relate to computer software or computer hardware within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

have you test the command "ls -l". The man-page for ls: – freerider Sep 14 '11 at 10:09
up vote 2 down vote accepted

You can use the command

ls -l

to show the permissions on a file. The command displays:

-rwxrwxrwx    doggie   users   29212      May 12 09:59
permissions   owner    group   filesize   last modified   filename

If you want to modify the permissions, you can use

chmod +x

to give execute permissions.

share|improve this answer
Why do you say to run ls with -a? It does nothing in this case. – camh Sep 14 '11 at 10:45
@camh : you are correct. Sorry, force of habit. – parasietje Sep 14 '11 at 10:52
Thank you very much . – yyy i 777 Sep 14 '11 at 11:03

Not the answer you're looking for? Browse other questions tagged .