Setting execute permissions on a second hard drive
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Setting execute permissions on a second hard drive
I am running Linux Mint on my primary hard drive, and I would like to access some folders I have on my second hard drive, which has Windows XP installed on it. However, whenever I try to use these folders, I am greeted with the error message, "The file is not marked as executable." While I know how to set files as executable whenever I am using folders on my Linux drive, whenever I try to set such permissions on my XP folders, I can't seem to make it work. The files revert to their former status, and I'm told that I don't have permission. Should I set the files as sharable from within XP, so that they aren't marked as read-only? Or is there another solution I've missed?
My understanding is that Windows file systems don't understand Linux permissions routine.
I'm a little curious, too. Linux cannot "execute" Windows executables (*.exe files), so the executable attribute would seem to me not to be much of an issue, whereas "read" and "write" could be extremely important.
Just for grins and giggles, try running ls -l on the some files on the Windows partition and report back what it tells you.
As I write this, it occurs to me to ask whether the Windows drives are in your /etc/fstab and, if so, what does fstab say about them.
frankbell is correct. FAT and NTFS are not capable of natively handling *nix style permissions and ownership. They can only be simulated at mount time with various masking options (uid, gid, umask, fmask, and dmask). See the relative sections of the mount and ntfs-3g man pages for more.
Wow thanks everyone for the helpful replies! I'm still a recent newcomer to Linux, but it just amazes me how helpful the community is!
OK, I understand that Linux can't understand .exe files, so I was hoping that I would be able to run them with WINE, and this is why I was trying to get executable permissions. I ran the ls -l on the partition as you suggested Frankbell, and so far it has been a mixed bag. I see a lot of different permissions for different files, but for the executable folders I'm trying to access, their permission status isn't listed at all, including no reading or writing permissions.
Just a quick question T3RM1NVTOR: what does it mean when the file has an immutable attribute? Does it simply mean that it is inalterable, or could I change the permissions, with that command?
Alright David the H, so the XP partition will not change because it uses a different ownership system than Linux, so thank you for explaining that. I will certainly check out the mount and ntfs -3g man pages for more info, but I'm uncertain what you mean by masking options. I'm afraid I haven't gotten that far with my Linux usage to learn what masking is.
As a final note, maybe I could simply mount the XP Partition with VirtualBox, and run the programs that way? It might be easier than trying to set the permissions so that Wine could launch the files.
Yes when a file is set with immutable attribute it is inalterable, you will not be able to make any changes to permission nor you will be able to edit the file, it will open in Read Only mode. You have to first remove the immutable attribute then only you will be able to edit the file or change permissions.
To check if the file is set with immutable attribute you can type: lsattr filename
One more thing that you might find useful is that if you would like to run any Windows application you would require an emmulation software for this on Linux. Wine (www.winehq.com) and CrossOver Office (www.codesweaver.com) are the ones which I am aware of.
Last edited by T3RM1NVT0R; 04-05-2011 at 05:50 PM.
Please don't try to run Windows programs with Wine from a working Windows installation. The WineHQ website warns that this will definitely damage your Windows. By the way, as frankbell also stated, you don't need the executable flag for wine, because wine is the part that will be executed and then run the Windows executable.
If you want to run Windows programs in Linux, I would either recommend a clean install of that program through Wine (if it is supported) or a clean install of Windows in a virtual machine.
Thank you for that clarification, T3R, I'll use that command and find out about the immutable attributes (if any) held by the folders.
I didn't realize that Wine doesn't need executable permissions, Tobi and frankbell, so thanks for explaining that. However, whenever I select the program and tell Linux to open it with Wine, I still get the "not marked as executable" error message. Wine may not care, but Linux still does for some reason.
Dash it all, Tobi, I didn't realize that Wine shouldn't be run from a Windows installation. Now that might explain why, after trying to launch a Windows program with Wine, I can no longer boot up XP. The partition is fine, as all the files are there, and it does appear in the Mint bootloader, but whenever I select it now, it just defaults to the Mint partition boot. I guess I'll just have to find a way to repair it, or restore if that isn't an option. Thank you for the advice!