2

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).

5
  • "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, 2011 at 20:12
  • @pydave: see meta: meta.askubuntu.com/questions/1332/… and meta.askubuntu.com/questions/1333/… formatting tools seem to have disappeared in chromium.
    – Rinzwind
    May 5, 2011 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, 2011 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, 2011 at 20:24
  • Removed the last part since it is not related to the question at hand May 5, 2011 at 21:11

2 Answers 2

2

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?

0
2

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

3
  • 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? May 5, 2011 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, 2011 at 22:09
  • Good idea Takkat. May 5, 2011 at 22:14

You must log in to answer this question.

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