Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 Denem.sh is present in the directory.

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

share|improve this question
    
have you test the command "ls -l". The man-page for ls: unixhelp.ed.ac.uk/CGI/man-cgi?ls –  freerider Sep 14 '11 at 10:09
add comment

migrated from stackoverflow.com 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.

1 Answer

up vote 2 down vote accepted

You can use the command

ls -l Denem.sh

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

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

If you want to modify the permissions, you can use

chmod +x Denem.sh

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
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.