Shell scripts require executable permission - prior ubuntus and unix do not

Bug #652283 reported by intrader
260
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu
Invalid
Undecided
Unassigned

Bug Description

This problem started with 10.10 Beta, It is now in 10.10 RC and I have noticed that latest 10.04 has picked up updates make it behave incorrectly also

 I am following up on a possible deficiency of 10.10 RC - in this distribution shell scripts must be set to executable before the context menu offers the 'Open' (with dialog to confirm that you want to execute a script). This is contrary to normal ubuntu and unix practice.
10.10 RC does not offer the 'Open' if the script does not have the executable bit on. The new version does offer the 'Open' and the dialog if the script file is flagged as executable.

The possible package is Nautilus -

I have tried this problem in:
1.OpenSolaris,
2.Ubuntu 9.04
3.Fedora 11.
4.Mandrake 8
5.Suse 11.
6.As well as in the unix compatible MacOS and Windows XP Unix Shells.

What I expect is that scripts with '#!xxxx (xxxx is shell path) should not required to have the executable bit on to offer the 'Open' context menu (with dialog for script execution)
All shell scripts of any kind suffer this problem (perl, python, bash, etc).

What happens instead:
1. the context menu for the file only offers an 'open text edit',
2. when the executable bit is on, may be the dialog should ask for root permission (which should be remembered in a thread of shell calls.
3. Files with .EXE, .COM, .BAT are not required to have the executable bit on and the context menu works. THIS IS A SECURITY VULNERABILITY

Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

On Ubuntu, this is by design. See:

https://wiki.ubuntu.com/SecurityTeam/Policies#Execute-Permission%20Bit%20Required

This isn't an issue.

visibility: private → public
Changed in ubuntu:
status: New → Invalid
Revision history for this message
Scott Ritchie (scottritchie) wrote :

This was a deliberate decision by the security team. See https://wiki.ubuntu.com/SecurityTeam/Policies#Execute-Permission%20Bit%20Required

Files with .exe only work with the context menu (open with Wine) if they have execute bit, otherwise cautious launcher spews out its complaints. This behavior is overridden if you have the packages from the Wine PPA (or similar), because cautious launcher isn't very friendly.

Revision history for this message
intrader (intrader) wrote :

That make sense.

I don't know the implications for millions of script files that would require setting of the executable bit.

Revision history for this message
intrader (intrader) wrote :

This bug report should not be marked as invalid; the problem still exists.

Revision history for this message
intrader (intrader) wrote :

The newest 10.10 RC has changed the manner in which shell script files are executed. It requires that the script file be flagged as executable.
This is perhaps better than prior practice in ubuntu 9.04 and many other distributions of linux and unix. However, it does require change to the scripts.

To post a comment you must log in.
This report contains Public Security information  
Everyone can see this security related information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.