Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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

Am trying to open some html, php, js and css files i copied to /var/www. If they have the Execute permission (Allow execute file as program) option set i can not open them with gedit which i did normally in Ubuntu 10.10 and tested yesterday installing 10.10 to make sure.

If i remove the execute option it works and opens with gedit.

I also set Nautilus to Run executable text files when they are opened in the Nautilus preferences (Behavior section).

share|improve this question
"option does not appear in here" you mean on askubuntu? The img button should be between the code button (<$>) and the numbered list. – idbrii May 5 '11 at 20:12
@pydave: see meta:… and… formatting tools seem to have disappeared in chromium. – Rinzwind May 5 '11 at 20:18
you can still add images from the web like this ![images_name][1] and on a line below it [1]: url_to_image. I started uploading my pixs to imageshack for the time being! – Rinzwind May 5 '11 at 20:20
@Rinzwind: I'm using Chromium (from natty/main), so hence my confusion. I guess the dev builds are wacky? – idbrii May 5 '11 at 20:24
Removed the last part since it is not related to the question at hand – Luis Alvarado May 5 '11 at 21:11
up vote 2 down vote accepted

I'm not certain I understand, but if you remove the execute permission from folders, then you won't be able to look inside them. (So if you removed the execute permission from /var/www, you wouldn't be able to see any of the files inside.)

Try the following in Terminal. (It will modify permissions on everything under /var/www.)

chmod u+x -R /var/www
find /var/www -type f | xargs chmod u-x

Now the folders should be executable (so you can look inside of them), but the files are not.

Does that help?

share|improve this answer
Wow you rock. It was that simple. Thank you. – Luis Alvarado May 5 '11 at 21:13

We need to decide what we want Nautilus to do with executable text files. From Edit -> Preferences -> Behaviour we will have the choice of three options:

enter image description here

  • Run executable text files when they are opened:

    Always runs these files on opening or on mouse click

  • View executable text files when they are opened:

    Always open these files in your standard text editor/viewer

  • Ask each time:

    Lets us choose what to do in an additional window:

enter image description here

share|improve this answer
It is strange since in 10.04 and 10.10 i could open a executable html file. Analyzing everything i see it was a mistake that is fixed in 11.04 since Nautilus will want to execute a file but isnt opening a file an executable characteristic? – Luis Alvarado May 5 '11 at 21:33
I always have the tick on "Ask Each Time" so I have not recognized this different behaviour. You already found your solution but nevertheless I felt that adding the standard GUI settings help others that may find their way here. – Takkat May 5 '11 at 22:09
Good idea Takkat. – Luis Alvarado May 5 '11 at 22:14

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.