Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

I have a directory called sai at /var/www/html/. I gave permission initially 755 and tried 777. I have loggen in as user nitish. When I tried to edit the files , it says the file is read-only. But if I edit files through terminal logging as root, I can edit the same files. Below is ls -l command output:

[root@localhost sai]# ls -l
total 48
-rwxr-xr-x. 1 root root 5508 Mar 30 15:40 build-my-website.html
-rwxr-xr-x. 1 root root  674 Mar 30 15:40 check.html
drwxr-xr-x. 3 root root 4096 Mar 30 15:40 css
drwxr-xr-x. 2 root root 4096 Mar 30 15:40 images
-rwxr-xr-x. 1 root root 9002 Mar 30 15:40 index.html
drwxr-xr-x. 2 root root 4096 Mar 30 15:40 js
-rwxr-xr-x. 1 root root 4589 Mar 30 15:40 overview.html
drwxr-xr-x. 4 root root 4096 Mar 30 15:40 slider
share|improve this question
up vote 2 down vote accepted

File permissions aren't inherited from parent directory on change. This is what ls's first column means: (rwx is read, write, execution)

[directory] [owner perms] [group perms] [everybody else's prems]
     d           rwx           r-x                r-x

As you can see, only owner (root, third column of ls) can write to the file. You can use chmod to allow everybody edit these files:

chmod go+w *


chmod a+w *

First command means:

Allow (+) group members (g) and others (o) write (w) to the file, for all files (*).

Second one is

Allow everybody (a) write to the file.

share|improve this answer
Thank you very much..I have been looking for this answer . Thanks for the explanation – Nitish Mar 30 '13 at 12:00

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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