Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
08-10-2006, 11:06 AM
|
#1
|
Senior Member
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705
Rep:
|
Stupid chmod tricks with Rox filer
Hey guys,
I have a directory structure with a bunch of directories and source files in those directories, with no filename extensions. I made the mistake of double clicking one in Rox which promptly sent the system into an unrecoverable, smoking tailspin as it tried to execute a few thousand lines of source as a shell script because everything in the directory had the executable bit set on. I had to power the machine off. Good ole Reiserfs- I didn't lose anything.
How do I fix this? I need executable turned on on directories, or I can't cd. But I want it turned off on files, these are source files. Is there a way to do a chmod to fix this? Or something else?
Thanks,
Rand
|
|
|
08-10-2006, 11:20 AM
|
#2
|
Member
Registered: Apr 2005
Location: Havant, Hampshire, UK
Distribution: Slamd64, Slackware, PS2Linux
Posts: 465
Rep:
|
I wrote a script to use chmod to recursively change the permissions of files while maintaining the executable bit on the directories it recurses into. My problem was caused because i migrated all my data from FAT partitions when i made the grand switch =)
You can find the details of it here: http://www.kaear.co.uk/default.asp?pageID=33
And a direct link here: http://www.kaear.co.uk/linux/massfileset.sh
This will correct the problem, but won't stop it recurring (say if you copy stuff off a memory key regularly). If you go to Types in Rox options (right click --> options --> Types on left menu), you'll see a tickbox at the top: "Ignore eXecutable bit for known extensions". Ticking this will stop anything like you describe happening above.
Of course, the above is only relevant if you have file extensions on your source files. If I may ask, what source files have no extension?
- Piete.
PS: I hope there is enough clarity and DIRECT LINKS there for you.
PPS: The script has NOT been written exceptionally defensively, so I take no responsibility for misuse and/or loss of data.
PPPS: Seriously, it's not my fault if you don't follow instructions to the letter.
|
|
|
08-10-2006, 11:50 AM
|
#3
|
Senior Member
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705
Original Poster
Rep:
|
Quote:
Originally Posted by piete
I wrote a script to use chmod to recursively change the permissions of files while maintaining the executable bit on the directories it recurses into. My problem was caused because i migrated all my data from FAT partitions when i made the grand switch =)
|
Ok, so the good news is that I didn't miss anything obvious. I thought that as soon as I wrote a script someone would point out that I could have issued a four character command and everything would have been fixed
Quote:
Originally Posted by piete
This will correct the problem, but won't stop it recurring (say if you copy stuff off a memory key regularly).
|
Understood, thanks.
Quote:
Originally Posted by piete
If I may ask, what source files have no extension?
|
It's some work I imported from another platform.
Quote:
Originally Posted by piete
PS: I hope there is enough clarity and DIRECT LINKS there for you.
|
LOL your answers are always complete and helpful, Piete. That wasn't directed at you. But people should realize that there's a lot going on in the world and not everybody is an expert in Linux, etc. What might be enough for one person wasn't enough for me in that case- which should have been obvious- because anyone who had to ask the question obviously had some gaps.
I guess I'm used to people coming from all different backgrounds so I try not to assume they know something. But that can also be a mistake.
Quote:
Originally Posted by piete
Seriously, it's not my fault if you don't follow instructions to the letter.
|
But what if I do...?
Thanks a lot,
Rand
|
|
|
08-10-2006, 11:54 AM
|
#4
|
Member
Registered: Apr 2005
Location: Havant, Hampshire, UK
Distribution: Slamd64, Slackware, PS2Linux
Posts: 465
Rep:
|
Quote:
Quote:
Originally Posted by piete
Seriously, it's not my fault if you don't follow instructions to the letter.
But what if I do...?
|
Then I will take full credit for fixing your box =D
Take it easy,
- Piete.
|
|
|
08-10-2006, 11:57 PM
|
#5
|
Senior Member
Registered: Oct 2003
Location: lost in the midwest...
Distribution: Slackware
Posts: 1,098
Rep:
|
Quote:
If you go to Types in Rox options (right click --> options --> Types on left menu), you'll see a tickbox at the top: "Ignore eXecutable bit for known extensions". Ticking this will stop anything like you describe happening above.
|
i'm using rox-filer 2.3 and i don't find the the tick box in my options. all i see is mime types and themes. am i missing something? this has got my curiousity up now....lol
|
|
|
08-11-2006, 05:44 AM
|
#6
|
Member
Registered: Apr 2005
Location: Havant, Hampshire, UK
Distribution: Slamd64, Slackware, PS2Linux
Posts: 465
Rep:
|
Bizarrely enough it seems as though I'm using 2.2.0 ... i'm pretty sure i've got 2.3 at work, and the same box is there *somewhere*, have a hunt around for it ... meanwhile, I shall think about upgrading!
|
|
|
All times are GMT -5. The time now is 09:58 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|