LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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!

Notices


Reply
  Search this Thread
Old 04-04-2011, 01:30 PM   #1
Diogones
LQ Newbie
 
Registered: Feb 2011
Posts: 27

Rep: Reputation: 2
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?
 
Old 04-04-2011, 01:36 PM   #2
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
@ Reply

Hi Diogones,

Try chattr -i filename.

It might be possible that immutable attribute has been set on the file which is not allowing you to change the permission.
 
Old 04-04-2011, 09:30 PM   #3
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,307
Blog Entries: 28

Rep: Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136
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.
 
Old 04-04-2011, 09:47 PM   #4
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852

Rep: Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037
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.
 
Old 04-05-2011, 11:29 AM   #5
Diogones
LQ Newbie
 
Registered: Feb 2011
Posts: 27

Original Poster
Rep: Reputation: 2
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.
 
Old 04-05-2011, 04:48 PM   #6
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
@ Reply

Hi Diogones,

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

More information on lsattr can be found at: http://linux.die.net/man/1/lsattr

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 04:50 PM.
 
Old 04-05-2011, 06:15 PM   #7
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,307
Blog Entries: 28

Rep: Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136
Quote:
Originally Posted by Diogones View Post
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 don't think wine cares about Linux permissions on Windows programs. I have a Windows executable that I use from time to time.

In Linux, it has the following permissions:

Code:
-rw-r--r--
Nevertheless, it runs just fine under wine.
 
Old 04-05-2011, 06:41 PM   #8
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
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.
 
Old 04-06-2011, 09:26 AM   #9
Diogones
LQ Newbie
 
Registered: Feb 2011
Posts: 27

Original Poster
Rep: Reputation: 2
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!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
setting drive permissions rmcellig Linux - Newbie 2 08-28-2010 05:20 AM
Hard Drive Permissions yusuo Mandriva 5 05-16-2007 07:34 AM
Setting permissions on an external USB hard drive so that all users can read from it? Pi Man Linux - Hardware 2 09-07-2004 09:50 PM
Setting Drive Permissions StarSage Fedora 1 06-10-2004 12:14 AM
Setting Directory Permissions is Hard ! dpaille Linux - General 1 12-12-2002 01:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration