Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
tosidornottosidOffline
Post subject: Scripts executable by default  PostPosted: 15.10.2013, 07:03



Joined: 08.09.2013
Posts: 11

Status: Offline
Hello!

How can we set every script or script-like entity
executable by default in our system?

Sometimes it is very time-consuming (and boring) to
set scripts executable one by one. I have observed that
on my Debian installation it goes like that: scripts are set executable by default.

How can we achieve this on siduction? I know it is not very
secure, but...

Thanks!
 
 View user's profile Send private message  
Reply with quote Back to top
diblOffline
Post subject: RE: Scripts executable by default  PostPosted: 15.10.2013, 19:51
Moderator


Joined: 22.12.2011
Posts: 761
Location: Dayton, Ohio, USA
Status: Offline
Excuse me for challenging the question -- I hate it if anyone does that to me -- but it seems a very unusual question. (I have never heard it in 7 years of using Linux).

Executable by whom?

And what problem, exactly, is this trying to solve? (What script does not have execute permissions, that needs to be changed)?

_________________
Asus P6X58D-E, i7-950, Nvidia GTX-480, OCZ Revodrive, 2@WD1002FAEX in BTRFS
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
tosidornottosidOffline
Post subject: RE: Scripts executable by default  PostPosted: 17.10.2013, 00:08



Joined: 08.09.2013
Posts: 11

Status: Offline
Ok! I will give the real example in order to be precise.

I use, alongside the native linux software, a few java applications. When I install a new system, like I did a month ago with siduction, I copy these applications to the hard drive. They are standalone. Every one of them has a
shell script. I use these scripts to create the Menu entries for these applications.

So this is the issue: I had to make executable every one of them. They
where not executable by default. Sometimes, I had to search to the subfolders too. For example, in Haundrix Chess, I had to make executable not only the main program file, but also the chess engines that where inside some strange subfolder.

So I have this question because I noticed that on my Debian Sid installation, all these scripts are executable by default. That is, just by copying them to the hard drive. I don't have to go to very single one of them and make them executable. So, Debian sees them as executables by default, while siduction sees them as text files.

And I wonder if this is a general system setting, or maybe a file manager setting? I use KDE and Dolphin.

Of course, this is not a serious matter, I am just curious...

I hope I gave a better explanation this time!
 
 View user's profile Send private message  
Reply with quote Back to top
ralulOffline
Post subject: RE: Scripts executable by default  PostPosted: 17.10.2013, 00:58



Joined: 12.09.2010
Posts: 1616
Location: Hamburg
Status: Offline
Make yourself a script:
      Code:
#!/bin/bash
[ -z $1 ] && exit
[ -d "$1" ] || exit
find "$1" | while read f; do
 [ -f "$f" ] || continue
 h=$(head -n 1 "$f")
 [ "${h:0:3}" = "#!/" ] && chmod +x "$f"
done
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 11 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by Zafenio